Skip to content

Commit

Permalink
Merge pull request lmc-eu#28 from lmc-eu/grunt_upgrade
Browse files Browse the repository at this point in the history
Upgrade grunt to 0.4
  • Loading branch information
abtris committed Apr 25, 2013
2 parents 6915333 + a8b665d commit a782504
Show file tree
Hide file tree
Showing 9 changed files with 172 additions and 223 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
@@ -1,4 +1,4 @@
language: node_js
node_js:
- 0.8
- 0.6
- 0.10
- 0.8
98 changes: 98 additions & 0 deletions Gruntfile.js
@@ -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']);
};
35 changes: 0 additions & 35 deletions build/tasks/clean.js

This file was deleted.

72 changes: 0 additions & 72 deletions build/tasks/helpers.js

This file was deleted.

88 changes: 0 additions & 88 deletions grunt.js

This file was deleted.

55 changes: 32 additions & 23 deletions package.json
@@ -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"
}
}

0 comments on commit a782504

Please sign in to comment.