Skip to content

Instantly share code, notes, and snippets.

@sankargorthi
Last active December 23, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sankargorthi/6645843 to your computer and use it in GitHub Desktop.
Save sankargorthi/6645843 to your computer and use it in GitHub Desktop.
Latest `grunt-component-build`
{
"name": "utils",
"repo": "sgorthi/utils",
"description": "0.0.1",
"version": "0.0.1",
"keywords": [],
"dependencies": {},
"development": {},
"license": "MIT",
"main": "index.js",
"dependencies": {
"sgorthi/jquery": "*",
"sgorthi/lodash": "*",
"sgorthi/backbone": "*"
},
"scripts": [
"index.js"
],
"remotes": [
"http://10.0.5.49:3917/components/"
]
}
'use strict';
module.exports = function (grunt) {
var _, hbs, sass;
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
_ = require('underscore');
grunt.initConfig({
clean: ['./build'],
componentbuild: {
build: {
options: {
dev: true,
sourceUrls: true
},
components: {
options: {
name: 'dev'
},
src: 'utils',
dest: 'utils/build'
}
},
dist: {
options: {
dev: false,
sourceUrls: false
},
components: {
options: {
name: 'dist'
},
dest: 'build'
}
}
},
watch: {
scripts: {
files: [
/* '** /*.js' ,*/
],
tasks: [ 'component_build:build' ]
}
},
uglify: {
dist: {
files: {
"build/dist.js.compressed": "build/dist.js"
}
},
options: {
compress: true,
preserveComments: false
}
}
});
grunt.registerTask('default', [
'componentbuild:build'
]);
// TODO:switch to dist task for templates if any
grunt.registerTask('dist', [
'componentbuild:dist',
'uglify:dist'
]);
};
'use strict';
module.exports = function (grunt) {
var _, hbs, sass;
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
_ = require('underscore');
grunt.initConfig({
clean: ['./build'],
componentbuild: {
build: {
options: {
dev: true,
sourceUrls: true
},
components: {
options: {
name: 'dev'
},
dest: './build'
}
},
dist: {
options: {
dev: false,
sourceUrls: false
},
components: {
options: {
name: 'dist'
},
dest: 'build'
}
}
},
watch: {
scripts: {
files: [
/* '** /*.js' ,*/
],
tasks: [ 'component_build:build' ]
}
},
uglify: {
dist: {
files: {
"build/dist.js.compressed": "build/dist.js"
}
},
options: {
compress: true,
preserveComments: false
}
}
});
grunt.registerTask('default', [
'componentbuild:build'
]);
// TODO:switch to dist task for templates if any
grunt.registerTask('dist', [
'componentbuild:dist',
'uglify:dist'
]);
};
exports.jquery = require('jquery');
exports.lodash = require('lodash');
exports.backbone = require('backbone');
{
"name": "utils",
"version": "0.0.1",
"repository": "sgorthi/utils",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-component-build": "~0.4.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-uglify": "~0.2.4",
"load-grunt-tasks": "~0.1.0",
"time-grunt": "~0.1.1",
"underscore": "~1.5.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment