forked from lmc-eu/ngx-library
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request lmc-eu#28 from lmc-eu/grunt_upgrade
Upgrade grunt to 0.4
- Loading branch information
Showing
9 changed files
with
172 additions
and
223 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- 0.8 | ||
- 0.6 | ||
- 0.10 | ||
- 0.8 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
module.exports = function(grunt) { | ||
// tasks | ||
grunt.loadTasks('build/tasks'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-recess'); | ||
grunt.loadNpmTasks('grunt-karma'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
|
||
// configuration | ||
grunt.initConfig({ | ||
pkg: '<json:package.json>', | ||
meta: { | ||
banner: '/**\n' + | ||
' * <%= pkg.description %>\n' + | ||
' * @version v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + | ||
' * @link <%= pkg.homepage %>\n' + | ||
' * @license MIT License, http://www.opensource.org/licenses/MIT\n' + | ||
' */' | ||
}, | ||
concat: { | ||
dist: { | ||
src: ['<banner:meta.banner>', 'src/ngx.js', 'src/deps/ecmascript/*.js', 'src/deps/head.js/*.js', 'src/modules/**/!(lang|test)/*.js', 'src/modules/**/lang/*.js'], | ||
dest: 'dist/ngx.js' | ||
} | ||
}, | ||
clean: { | ||
build: ['dist/'] | ||
}, | ||
copy: { | ||
dist: { | ||
files: [ | ||
{expand: true, src: ['src/modules/ui/**/*.html'], dest: 'dist/templates/ui' }, | ||
{expand: true, src: ['libs/**'], dest: 'dist/libs'} | ||
] | ||
} | ||
}, | ||
uglify: { | ||
// Specify mangle: false to prevent changes to your variable and function names. | ||
options: { | ||
mangle: false | ||
}, | ||
dist: { | ||
files: { | ||
'dist/ngx.min.js': ['dist/ngx.js'] | ||
} | ||
} | ||
}, | ||
recess: { | ||
dist_css: { | ||
src: 'src/**/*.less', | ||
dest: 'dist/styles/ngx.css', | ||
options: { | ||
compile: true | ||
} | ||
}, | ||
dist_min: { | ||
src: 'src/**/*.less', | ||
dest: 'dist/styles/ngx.min.css', | ||
options: { | ||
compile: true, | ||
compress: true | ||
} | ||
} | ||
}, | ||
jshint: { | ||
files: ['Gruntfile.js', 'src/ngx.js', 'src/modules/**/*.js'] | ||
}, | ||
watch: { | ||
scripts: { | ||
files: ['Gruntfile.js', 'src/*.js', 'src/**/*.js', 'test/**/*.js'], | ||
tasks: ['lint', 'concat', 'min', 'karma'] | ||
}, | ||
styles: { | ||
files: ['src/**/*.less'], | ||
tasks: ['recess'] | ||
}, | ||
templates: { | ||
files: ['src/modules/**/*.html'], | ||
tasks: ['copy'] | ||
} | ||
}, | ||
karma: { | ||
unit: { | ||
configFile: 'test/unit/config.js', | ||
runnerPort: 9999, | ||
singleRun: true, | ||
browsers: ['PhantomJS'] | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask('default', ['jshint', 'clean', 'concat', 'copy', 'uglify', 'recess']); | ||
grunt.registerTask('devel', ['karma', 'watch']); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,34 @@ | ||
{ | ||
"author": "https://github.com/lmc-eu", | ||
"name": "ngx-library", | ||
"description": "NGX - extension library for AngularJS", | ||
"version": "0.2.2", | ||
"homepage": "http://github.com/lmc-eu/ngx-library", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/lmc-eu/ngx-library.git" | ||
}, | ||
"engines": { | ||
"node": "~=0.8.0" | ||
}, | ||
"dependencies": { | ||
"rimraf": "~=2.0.2", | ||
"testacular": "~=0.4.0", | ||
"grunt": "~=0.3.12", | ||
"grunt-recess": "~=0.1.0", | ||
"grunt-testacular": "~=0.2.0" | ||
}, | ||
"scripts" : { | ||
"pretest": "grunt", | ||
"test": "grunt testacularServer" | ||
} | ||
"author": "https://github.com/lmc-eu", | ||
"name": "ngx-library", | ||
"description": "NGX - extension library for AngularJS", | ||
"version": "0.3.0", | ||
"homepage": "http://github.com/lmc-eu/ngx-library", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/lmc-eu/ngx-library.git" | ||
}, | ||
"engines": { | ||
"node": "~0.8.0" | ||
}, | ||
"dependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-recess": "~0.3.0", | ||
"grunt-karma": "~0.4.0", | ||
"grunt-contrib-jshint": "~0.4.0", | ||
"grunt-contrib-watch": "~0.3.1", | ||
"karma": "~0.8.0", | ||
"istanbul": "~0.1.0", | ||
"jshint": "~1.1.0", | ||
"phantomjs" : "~1.9.0", | ||
"grunt-cli": "~0.1.0", | ||
"grunt-contrib-concat": "~0.2.0", | ||
"grunt-contrib-uglify": "~0.2.0", | ||
"grunt-contrib-clean": "~0.4.1", | ||
"grunt-contrib-copy": "~0.4.1" | ||
}, | ||
"scripts": { | ||
"pretest": "grunt", | ||
"test": "grunt karma" | ||
} | ||
} |
Oops, something went wrong.