Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
shanti2530 committed Oct 1, 2016
2 parents 57f2b85 + aad12db commit 3db32e3
Show file tree
Hide file tree
Showing 16 changed files with 5,240 additions and 109 deletions.
102 changes: 35 additions & 67 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,77 +12,48 @@ module.exports = function(grunt) {
jshintrc: ".jshintrc"
}
},
clean: ['dist/**'],
copy: {
chromeextension: {
newBuild: {
files: [
{src: 'src/*', dest: 'gen/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/*.js', dest: 'gen/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/*.json', dest: 'dist/chrome-extension/', flatten: true, expand:true, filter: 'isFile'},
{src: 'src/chrome-extension/*.css', dest: 'dist/chrome-extension/', flatten: true, expand:true, filter: 'isFile'}
{src: 'bower_components/momentjs/min/moment.min.js', dest: 'src/scripts/moment.min.js'},
{src: 'node_modules/chance/chance.js', dest: 'src/scripts/chance.js'},
{src: 'bower_components/angular/angular.min.js', dest: 'src/options/angular.min.js'},
{src: 'bower_components/bootstrap/dist/css/bootstrap.min.css', dest: 'src/options/bootstrap.min.css'},
{src: 'bower_components/font-awesome/css/font-awesome.min.css', dest: 'src/options/font-awesome.min.css'}
]
},
chromeextensiondist: {
files: [
{src: 'gen/chrome-extension/*.png', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/*.html', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/*.css', dest: 'dist/chrome-extension/', flatten: true, expand: true},
{src: 'gen/chrome-extension/background.js', dest: 'dist/chrome-extension/background.js'},
{src: 'gen/chrome-extension/options.js', dest: 'dist/chrome-extension/options.js'},
{src: 'gen/chrome-extension/externalScripts.js', dest: 'dist/chrome-extension/externalScripts.js'},
{src: 'gen/chrome-extension/optionsController.js', dest: 'dist/chrome-extension/optionsController.js'},
{src: 'bower_components/angular/angular.min.js', dest: 'dist/chrome-extension/angular.min.js'},
{src: 'bower_components/momentjs/min/moment.min.js', dest: 'dist/chrome-extension/scripts/moment.min.js'},
{src: 'bower_components/bootstrap/dist/css/bootstrap.min.css', dest: 'dist/chrome-extension/bootstrap.min.css'},
{src: 'bower_components/components-font-awesome/css/font-awesome.min.css', dest: 'dist/chrome-extension/font-awesome.min.css'},
{src: 'node_modules/chance/chance.js', dest: 'dist/chrome-extension/scripts/chance.js'}

release: {
files:[
{cwd: 'src', src: '**', dest: 'dist/', expand: true},
]
}
},
includes: {
chromeextension: {
src: ["gen/chrome-extension/*.js"],
dest: "gen/chrome-extension",
flatten: true
}
},
},
uglify: {
chromeextension: {
newBuild: {
files: {
'dist/chrome-extension/scripts/fillForms.min.js': ['gen/chrome-extension/fillForms.js']
'dist/scripts/fillForms.min.js': ['dist/scripts/fillForms.js']
}
},
options: {
mangle: false,
banner: "javascript:"
}
},
processhtml: {
chromeextension: {
files: {
'gen/chrome-extension/options.html': ['src/chrome-extension/options.html'],
'gen/chrome-extension/popup.html': ['src/chrome-extension/popup.html']
}
}
},
watch: {
chromeextension: {
files: ['**/*.js', '**/*.html', '**/*.css', '**/*.json'],
tasks: ['build'],
options: {
spawn: false
}
}
},
chromeManifest: {
dist: {
options: {
buildnumber: 'both',
background: 'src/chrome-extension/background.js'
},
src: 'src/chrome-extension',
dest: 'dist/chrome-extension'
}
},

// chromeManifest: {
// dist: {
// options: {
// buildnumber: 'both',
// background: {
// target: "scripts/*.js"
// }
// },
// src: 'src',
// dest: 'dist'
// }
// },
compress: {
dist: {
options: {
Expand All @@ -96,17 +67,14 @@ module.exports = function(grunt) {
}
});

grunt.registerTask('build', [
'copy:chromeextension',
'processhtml:chromeextension',
'includes:chromeextension',
'uglify:chromeextension',
'copy:chromeextensiondist'
// 'jshint:chromeextension'
grunt.registerTask('newBuild', [
'clean',
'copy:newBuild',
'copy:release',
'uglify:newBuild'
]);

grunt.registerTask('release', ['chromeManifest:dist', 'compress:dist']);

// Default task(s).
grunt.registerTask('serve', ['build','watch:chromeextension']);
grunt.registerTask('release', [
//'chromeManifest:dist',
'compress:dist']);
};
4 changes: 3 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"private": true,
"dependencies": {
"momentjs": "~2.4.0",
"angular": "~1.2.20"
"angular": "~1.2.20",
"bootstrap": "^3.3.7",
"font-awesome": "^4.6.3"
}
}
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
"devDependencies": {
"grunt": "~1.0.1",
"grunt-chrome-manifest": "~0.3.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-compress": "~1.3.0",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-jshint": "~1.0.0",
"grunt-contrib-uglify": "~2.0.0",
"grunt-contrib-watch": "~1.0.0",
"grunt-includes": "~1.0.0",
"grunt-processhtml": "~0.3.3",
"grunt-uncss": "~0.6.1",
"load-grunt-tasks": "~0.4.0"
},
"dependencies": {
Expand Down
3 changes: 0 additions & 3 deletions src/chrome-extension/popup.html

This file was deleted.

18 changes: 3 additions & 15 deletions src/chrome-extension/manifest.json → src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "Formbot",
"short_name": "Fill forms",
"description": "This extension will fill any inputs on the page",
"version": "1.0.1.3",
"options_page": "options.html",
"version": "1.0.1.2",
"options_page": "options/options.html",
"permissions": [
"activeTab",
"storage",
Expand All @@ -15,22 +15,10 @@
],
"background": {
"scripts": [
"background.js",
"scripts/chance.js"
"scripts/background.js", "scripts/chance.js", "scripts/moment.min.js"
],
"persistent": true
},
"content_scripts": [
{
"matches": [
"http://*/*",
"https://*/*"
],
"js": [
"scripts/moment.min.js"
]
}
],
"browser_action": {
"default_title": "Fill forms on page",
"default_icon": {
Expand Down
Loading

0 comments on commit 3db32e3

Please sign in to comment.