Grunt preen and concat
Set up grunt with tasks for: * preen - deletes unused files from bower_components, configured in bower.json * concat - concatenates preened bower components, configured automagically from the preen config It's worth noting that this setup assumes the order of files within a package doesn't matter. This is usually true since we often include only one file from the package.pull/749/head
parent
c8ad65efe0
commit
73f4f64351
@ -0,0 +1 @@
|
|||||||
|
node_modules
|
@ -0,0 +1,21 @@
|
|||||||
|
module.exports = function(grunt) {
|
||||||
|
|
||||||
|
// build the concat config from the preen config
|
||||||
|
var components = [];
|
||||||
|
for (component in grunt.file.readJSON('bower.json').preen) {
|
||||||
|
components.push('bower_components/' + component + '/**/*.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
grunt.initConfig({
|
||||||
|
concat: {
|
||||||
|
components: {
|
||||||
|
src: components,
|
||||||
|
dest: 'js-deps/bower_components.js',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
grunt.loadNpmTasks('grunt-preen');
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||||
|
|
||||||
|
grunt.registerTask('default', ['preen', 'concat']);
|
||||||
|
};
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "textsecure-chrome",
|
||||||
|
"repository": "https://github.com/WhisperSystems/TextSecure.git",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"devDependencies": {
|
||||||
|
"grunt": "^0.4.5",
|
||||||
|
"grunt-contrib-concat": "^0.5.0",
|
||||||
|
"grunt-contrib-jshint": "~0.10.0",
|
||||||
|
"grunt-preen": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue