forked from dollarshaveclub/stickybits
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [update] adds bundle configs * [update] adds acceptance test runner * [update] removes unneeded if statements and unused code * [update] no gulp * [update] switches from airbnb to standard lint config * [update] update build for 3.0.0 * [docs] readme 3.0.0 messaging * [upadte] update travis * [update] reverts forEach => for loop
- Loading branch information
1 parent
8739bb9
commit 5ad354d
Showing
19 changed files
with
252 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dist/* | ||
tests/* | ||
rollup.config.js | ||
gulpfile.js | ||
node_modules/* | ||
coverage/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"extends": [ "airbnb/base"], | ||
"extends": [ "standard"], | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { | ||
author, | ||
description, | ||
homepage, | ||
license, | ||
name, | ||
version | ||
} from '../package.json' | ||
|
||
const babelSetup = { | ||
babelrc: false, | ||
presets: [['es2015', { modules: false }]], | ||
exclude: 'node_modules/**' | ||
} | ||
|
||
const uglifyOutput = { | ||
output: { | ||
comments: function (node, comment) { | ||
const text = comment.value | ||
const type = comment.type | ||
if (type === 'comment2') { | ||
// multiline comment | ||
return /@preserve|@license|@cc_on/i.test(text) | ||
} | ||
} | ||
} | ||
} | ||
|
||
const banner = `/** | ||
${name} - ${description} | ||
@version v${version} | ||
@link ${homepage} | ||
@author ${author} | ||
@license ${license} | ||
**/` | ||
|
||
export { | ||
babelSetup, | ||
banner, | ||
uglifyOutput, | ||
version | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { | ||
babelSetup, | ||
banner, | ||
uglifyOutput, | ||
version | ||
} from '../configs/config' | ||
import babel from 'rollup-plugin-babel' | ||
import replace from 'rollup-plugin-replace' | ||
import uglify from 'rollup-plugin-uglify' | ||
|
||
export default { | ||
input: 'src/stickybits.js', | ||
plugins: [ | ||
babel(babelSetup), | ||
replace({ VERSION: JSON.stringify(version) }), | ||
uglify(uglifyOutput) | ||
], | ||
treeshake: false, | ||
output: { | ||
banner, | ||
file: 'dist/stickybits.es.js', | ||
format: 'es', | ||
name: 'stickybits', | ||
sourcemap: false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { | ||
babelSetup, | ||
banner, | ||
uglifyOutput, | ||
version | ||
} from '../configs/config' | ||
import babel from 'rollup-plugin-babel' | ||
import replace from 'rollup-plugin-replace' | ||
import uglify from 'rollup-plugin-uglify' | ||
|
||
export default { | ||
input: 'src/jquery.stickybits.js', | ||
plugins: [ | ||
babel(babelSetup), | ||
replace({ VERSION: JSON.stringify(version) }), | ||
uglify(uglifyOutput) | ||
], | ||
treeshake: false, | ||
output: { | ||
banner, | ||
file: 'dist/jquery.stickybits.min.js', | ||
format: 'umd', | ||
name: 'stickybits', | ||
sourcemap: false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { | ||
babelSetup, | ||
banner, | ||
uglifyOutput, | ||
version | ||
} from '../configs/config' | ||
import babel from 'rollup-plugin-babel' | ||
import replace from 'rollup-plugin-replace' | ||
import uglify from 'rollup-plugin-uglify' | ||
|
||
export default { | ||
input: 'src/stickybits.js', | ||
plugins: [ | ||
babel(babelSetup), | ||
replace({ VERSION: JSON.stringify(version) }), | ||
uglify(uglifyOutput) | ||
], | ||
treeshake: false, | ||
output: { | ||
banner, | ||
file: 'dist/stickybits.min.js', | ||
format: 'umd', | ||
name: 'stickybits', | ||
sourcemap: false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { | ||
babelSetup, | ||
banner, | ||
uglifyOutput, | ||
version | ||
} from '../configs/config' | ||
import babel from 'rollup-plugin-babel' | ||
import replace from 'rollup-plugin-replace' | ||
import uglify from 'rollup-plugin-uglify' | ||
|
||
export default { | ||
input: 'src/umbrella.stickybits.js', | ||
plugins: [ | ||
babel(babelSetup), | ||
replace({ VERSION: JSON.stringify(version) }), | ||
uglify(uglifyOutput) | ||
], | ||
treeshake: false, | ||
output: { | ||
banner, | ||
file: 'dist/umbrella.stickybits.js', | ||
format: 'umd', | ||
name: 'stickybits', | ||
sourcemap: false | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.