From 1d7e5a646d461dc5c0fd8dea1ad8b4fdd37e16c8 Mon Sep 17 00:00:00 2001 From: James Laska Date: Mon, 7 Jul 2014 09:41:44 -0400 Subject: [PATCH] Move grunt/js packaging files under packaging/grunt/ --- .gitignore | 4 +++- Gruntfile.js | 46 ---------------------------------------------- Makefile | 10 ++++++++-- bower.json | 30 ------------------------------ 4 files changed, 11 insertions(+), 79 deletions(-) delete mode 100644 Gruntfile.js delete mode 100644 bower.json diff --git a/.gitignore b/.gitignore index d6fbb456b7..a663e126df 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,8 @@ pep8.txt .tower_cycle nohup.out reports -package.json tools/vagrant/local.yml *~ +/GruntFile.js +/bower.json +/package.json diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index a49374f67f..0000000000 --- a/Gruntfile.js +++ /dev/null @@ -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']); -} diff --git a/Makefile b/Makefile index c9470034af..111f0a627e 100644 --- a/Makefile +++ b/Makefile @@ -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. diff --git a/bower.json b/bower.json deleted file mode 100644 index 07ca883cbc..0000000000 --- a/bower.json +++ /dev/null @@ -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" - } -}