Move grunt/js packaging files under packaging/grunt/

This commit is contained in:
James Laska 2014-07-07 09:41:44 -04:00
parent 69165b762a
commit 1d7e5a646d
4 changed files with 11 additions and 79 deletions

4
.gitignore vendored
View File

@ -29,6 +29,8 @@ pep8.txt
.tower_cycle
nohup.out
reports
package.json
tools/vagrant/local.yml
*~
/GruntFile.js
/bower.json
/package.json

View File

@ -1,46 +0,0 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('./package.json'),
jshint: {
options: {
jshintrc: '.jshintrc'
},
uses_defaults: ['awx/ui/static/js/*','awx/ui/static/lib/ansible/*', '!awx/ui/static/js/awx.min.js']
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */'
},
my_target: {
files: {
'awx/ui/static/js/awx.min.js': ['awx/ui/static/js/**/*.js', 'awx/ui/static/lib/ansible/*.js',
'!awx/ui/static/js/awx.min.js', '!awx/ui/static/js/config.js']
}
}
},
less: {
production: {
options: {
cleancss: true,
compress: true
},
files: {
"awx/ui/static/css/awx.min.css": "awx/ui/static/less/ansible-ui.less",
"awx/ui/static/css/ansible-bootstrap.min.css": "awx/ui/static/ansible-bootstrap/bootstrap.less"
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.registerTask('default', ['jshint', 'uglify', 'less']);
}

View File

@ -48,7 +48,7 @@ clean:
rm -rf build rpm-build *.egg-info
rm -rf debian deb-build
rm -f awx/ui/static/{js,css}/awx*.{js,css}
rm -rf node_modules package.json
rm -rf node_modules package.json GruntFile.js bower.json
find . -type f -regex ".*\.py[co]$$" -delete
# Fetch from origin, rebase local commits on top of origin commits.
@ -178,11 +178,17 @@ test_tox:
test_jenkins:
$(PYTHON) manage.py jenkins -v2
GruntFile.js:
cp packaging/grunt/$@ $@
bower.json:
cp packaging/grunt/$@ $@
package.json:
sed -e 's#%NAME%#$(NAME)#;s#%VERSION%#$(VERSION)#;s#%GIT_REMOTE_URL%#$(GIT_REMOTE_URL)#;' packaging/grunt/package.template > $@
# Update local npm install
node_modules: package.json
node_modules: GruntFile.js package.json
npm install
# Build minified JS/CSS.

View File

@ -1,30 +0,0 @@
{
"name": "ansible-commander",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"awx/ui/static/lib",
"test",
"tests"
],
"dependencies": {
"angular-codemirror": "~1.0.2",
"angular-cookies": "~1.2.12",
"angular-md5": "~0.1.7",
"angular-resource": "~1.2.12",
"angular-sanitize": "~1.2.12",
"angular-scheduler": "~0.0.14",
"bootstrap": "~3.1.1",
"components-font-awesome": "~4.0.3",
"less.js": "~1.6.3",
"select2": "~3.4.5",
"sizzle": "1.10.16",
"d3js": "*",
"angular-tz-extensions": "~0.3.10"
},
"resolutions": {
"angular": "1.2.19"
}
}