Skip to content

Commit

Permalink
replace gulp with webpack, use ES6
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Sajnóg committed Jun 18, 2016
1 parent 3999568 commit 3cfb8bc
Show file tree
Hide file tree
Showing 29 changed files with 686 additions and 877 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.scss, *.css]
indent_size = 2
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ node_js:
branches:
only:
- master
- dev
- (.+-dev$)|(^dev$)

env:
global:
Expand All @@ -17,7 +17,6 @@ before_install:
- sh -e /etc/init.d/xvfb start

install:
- npm install -g gulp
- npm install -g karma
- npm install

Expand Down
3 changes: 2 additions & 1 deletion dist/aos.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/aos.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/aos.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/aos.js.map

Large diffs are not rendered by default.

42 changes: 0 additions & 42 deletions gulp/bundle.js

This file was deleted.

25 changes: 0 additions & 25 deletions gulp/sass.js

This file was deleted.

12 changes: 0 additions & 12 deletions gulp/test.js

This file was deleted.

38 changes: 0 additions & 38 deletions gulpfile.js

This file was deleted.

94 changes: 36 additions & 58 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
// Generated on Mon Oct 19 2015 01:12:15 GMT+0200 (CEST)
var isTravis = process.env.TRAVIS || false;
var browsers = isTravis ? [ 'Chrome_travis_ci' ] : ['Chrome'];
var singleRun = isTravis;

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
browsers: browsers,
frameworks: ['jasmine-jquery', 'jasmine'],


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine', 'browserify'],


// list of files / patterns to load in the browser
files: [
'test/**/*.spec.js',
'test/index.js',
{
pattern: 'test/fixtures/**/*.html',
watched: true,
Expand All @@ -26,62 +20,46 @@ module.exports = function(config) {
}
],

plugins: [
'karma-chrome-launcher',
'karma-jasmine',
'karma-browserify'
],


// list of files to exclude
exclude: [
],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/**/*.spec.js': [ 'browserify' ]
'test/index.js': [ 'webpack' ]
},

webpack: {
devtool: 'inline-source-map',
module: {
loaders: [
{
test: /\.js?$/,
exclude: [/bower_components/, /node_modules/],
loader: 'babel'
},
{
test: /\.scss$/,
loader: "css-loader?sourceMap!sass-loader"
}
]
}
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],


// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
plugins: [
'karma-chrome-launcher',
'karma-jasmine-jquery',
'karma-jasmine',
'karma-webpack'
],

reporters: ['dots'],

customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: browsers,


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
port: 9876,
singleRun: singleRun,
colors: true,
logLevel: config.LOG_WARN
})
}
51 changes: 21 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,44 @@
"homepage": "http://michalsnik.github.io/aos/",
"author": "Michał Sajnóg <[email protected]>",
"license": "MIT",

"main": "dist/aos.js",

"repository": {
"type" : "git",
"url" : "https://github.com/michalsnik/aos.git"
"type": "git",
"url": "https://github.com/michalsnik/aos.git"
},

"bugs": {
"url": "https://github.com/michalsnik/aos/issues"
},

"devDependencies": {
"browser-sync": "~2.0.1",
"browserify": "^13.0.1",
"gulp": "^3.8.11",
"gulp-autoprefixer": "^2.3.1",
"gulp-concat": "~2.4.3",
"gulp-imagemin": "~2.2.0",
"gulp-minify-css": "^1.2.0",
"gulp-sass": "^2.0.4",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "~1.1.0",
"gulp-util": "^3.0.6",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1",
"babel-core": "^6.9.1",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"css-loader": "^0.23.1",
"sass-loader": "^3.2.0",
"style-loader": "^0.13.1",
"extract-text-webpack-plugin": "^1.0.1",
"node-sass": "^3.7.0",
"jasmine": "^2.4.1",
"jasmine-core": "^2.3.4",
"jasmine-fixture": "^1.3.3",
"jasmine-jquery": "^2.1.1",
"jquery": "^2.1.4",
"karma": "^0.13.11",
"karma-browserify": "^4.4.0",
"karma-chrome-launcher": "^0.2.1",
"karma-jasmine-jquery": "^0.1.1",
"karma-jasmine": "^0.3.6",
"lodash.assign": "^3.2.0",
"phantomjs": "^1.9.18",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.4.0"
"karma-webpack": "^1.7.0",
"phantomjs": "^1.9.18"
},

"dependencies": {
"lodash.assign": "^3.2.0",
"lodash.debounce": "^3.1.1",
"lodash.foreach": "^3.0.3",
"lodash.throttle": "^3.0.4"
"lodash.debounce": "^4.0.6",
"lodash.throttle": "^4.0.1"
},

"scripts": {
"test": "gulp test"
"test": "node ./node_modules/karma/bin/karma start karma.conf.js",
"build": "webpack",
"dev": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js"
}
}
Loading

0 comments on commit 3cfb8bc

Please sign in to comment.