Last active
December 23, 2015 13:59
-
-
Save sankargorthi/6645843 to your computer and use it in GitHub Desktop.
Latest `grunt-component-build`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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/" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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' | |
]); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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' | |
]); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.jquery = require('jquery'); | |
exports.lodash = require('lodash'); | |
exports.backbone = require('backbone'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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