Skip to content

Commit

Permalink
Merge pull request #38 from jcreamer898/js-structure
Browse files Browse the repository at this point in the history
Add unit tests, restructure build output
  • Loading branch information
trevanhetzel committed Oct 3, 2014
2 parents 28e2719 + c977f7d commit 89e46b4
Show file tree
Hide file tree
Showing 23 changed files with 1,165 additions and 584 deletions.
57 changes: 31 additions & 26 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
{
"name": "BareKit",
"devDependencies": {
"jquery": "~2.1.1"
},
"version": "0.6.1",
"homepage": "https://github.com/a2labs/barekit",
"authors": [
"Trevan Hetzel <[email protected]>"
],
"description": "A bare minimum responsive framework",
"license": "MIT",
"ignore": [
".sass-cache",
"node_modules",
"bower_components",
".bowercc",
".gitignore",
"example.html",
"gruntfile.js",
"package.json",
".bower.json",
"bower.json",
".bowercc",
"js/modules"
]
}
"name": "BareKit",
"devDependencies": {
"jquery": "~2.1.1",
"qunit": "~1.15.0"
},
"version": "0.6.1",
"homepage": "https://github.com/a2labs/barekit",
"authors": [
"Trevan Hetzel <[email protected]>"
],
"main": [
"js/barekit.min.js",
"css/barekit.css"
],
"description": "A bare minimum responsive framework",
"license": "MIT",
"ignore": [
".sass-cache",
"node_modules",
"bower_components",
".bowercc",
".gitignore",
"example.html",
"gruntfile.js",
"package.json",
".bower.json",
"bower.json",
".bowercc",
"src/modules"
]
}
37 changes: 28 additions & 9 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,31 @@ module.exports = function (grunt) {
}
},

concat: {
dist: {
src: [
'src/prefix.js',
'src/modules/core.js',
'src/modules/accordion.js',
'src/modules/dropdown-nav.js',
'src/modules/modal.js',
'src/modules/off-canvas.js',
'src/modules/tabs.js',
'src/modules/toggle.js',
'src/suffix.js'
],
dest: 'js/barekit.js',
}
},

/**
* Uglify
*/
uglify: {
modules: {
files: {
'js/barekit.min.js': [
'js/modules/core.js',
'js/modules/accordion.js',
'js/modules/dropdown-nav.js',
'js/modules/modal.js',
'js/modules/off-canvas.js',
'js/modules/tabs.js',
'js/modules/toggle.js'
'js/barekit.js'
]
}
}
Expand All @@ -74,18 +85,26 @@ module.exports = function (grunt) {
},
uglify: {
files: ['js/modules/*.js'],
tasks: ['uglify:modules']
tasks: ['js']
}
},
qunit: {
all: ['spec/**/*.html']
}
});

// Load NPM Tasks
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');

grunt.registerTask('js', [ 'concat', 'uglify' ]);
grunt.registerTask('test', [ 'js', 'qunit' ]);

// Register Tasks
grunt.registerTask('default', [ 'sass', 'autoprefixer', 'uglify' ]);
grunt.registerTask('default', [ 'sass', 'autoprefixer', 'js' ]);

};
Loading

0 comments on commit 89e46b4

Please sign in to comment.