Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit fb8b65d

Browse files
committed
chore(build): Re-initialise repo to get commitizen and semantic-release support.
1 parent efae829 commit fb8b65d

19 files changed

+229
-497
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.{js,py}]
8+
charset = utf-8
9+
10+
# 4 space indentation
11+
[*.js,*.json,{.eslintrc, .gulprc}]
12+
indent_style = space
13+
indent_size = 2

.eslintrc

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
11
{
22
"rules": {
3-
"indent": [
4-
2,
5-
2
6-
],
7-
"quotes": [
8-
2,
9-
"single"
10-
],
11-
"linebreak-style": [
12-
2,
13-
"unix"
14-
],
15-
"semi": [
16-
2,
17-
"always"
18-
]
3+
"indent": [2, 2],
4+
"quotes": [2, "single"],
5+
"linebreak-style": [2, "unix"],
6+
"semi": [2, "always"],
7+
"no-underscore-dangle": 0,
8+
"no-param-reassign": 0,
9+
"consistent-return": 0,
10+
"max-len": [1, 140, 4]
1911
},
2012
"env": {
2113
"es6": true,
2214
"node": true,
2315
"browser": true
2416
},
25-
"ecmaFeatures": {
26-
"modules": true,
27-
"jsx": true
28-
},
29-
"extends": "eslint:recommended",
17+
"extends": "airbnb",
3018
"globals": {
3119
"afterEach": true,
3220
"assert": true,
@@ -35,7 +23,11 @@
3523
"expect": true,
3624
"it": true
3725
},
38-
"plugins": [
39-
"react"
40-
]
26+
"ecmaFeatures": {
27+
"modules": true
28+
},
29+
"parserOptions": {
30+
"ecmaVersion": 6,
31+
"sourceType": "module"
32+
}
4133
}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ node_modules
3030
# Other
3131
.DS_Store
3232
.idea
33-
.tmp

.gulprc

Lines changed: 0 additions & 11 deletions
This file was deleted.

.travis.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
sudo: false
22
language: node_js
3+
node_js: stable
34
cache:
45
directories:
56
- node_modules
67
notifications:
78
email: false
8-
node_js:
9-
- '4'
10-
before_install:
11-
- npm i -g npm@^2.0.0
129
before_script:
1310
- npm prune
11+
- export DISPLAY=:99.0
12+
- sh -e /etc/init.d/xvfb start
13+
- npm install
14+
script:
15+
- sk-bundle
16+
- if [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ]; then
17+
npm test -- --saucelabs;
18+
else
19+
npm test -- --browsers Firefox;
20+
fi
1421
after_success:
15-
- npm run semantic-release
22+
- sk-release
1623
branches:
1724
except:
1825
- /^v\d+\.\d+\.\d+$/

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) {year} {author}
3+
Copyright (c) Trey Shugart <[email protected]> 2016
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

bower.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

dist/index.js

Lines changed: 0 additions & 318 deletions
This file was deleted.

dist/index.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/index.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/index.min.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

gulpfile.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

karma.conf.js

Whitespace-only changes.

lib/index.js

Lines changed: 0 additions & 111 deletions
This file was deleted.

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,26 @@
2424
"object-assign": "^4.1.0"
2525
},
2626
"devDependencies": {
27+
"cz-conventional-changelog": "^1.1.6",
2728
"eslint": "^1.10.1",
2829
"eslint-plugin-react": "^3.11.3",
2930
"react": "^0.14.3",
3031
"react-addons-test-utils": "^0.14.3",
3132
"react-dom": "^0.14.3",
33+
"semantic-release": "^4.3.5",
3234
"skatejs": "^0.14.3",
33-
"skatejs-build": "^2.1.0",
34-
"webcomponents.js": "0.7.22",
35-
"semantic-release": "^4.3.5"
35+
"skatejs-build": "^4.0.0",
36+
"webcomponents.js": "0.7.22"
3637
},
3738
"peerDependencies": {
3839
"react": ">=0.14.0"
3940
},
4041
"scripts": {
4142
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
43+
},
44+
"config": {
45+
"commitizen": {
46+
"path": "./node_modules/cz-conventional-changelog"
47+
}
4248
}
4349
}

rollup.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const rollupBabel = require('rollup-plugin-babel');
2+
const rollupCommonjs = require('rollup-plugin-commonjs');
3+
const rollupNodeResolve = require('rollup-plugin-node-resolve');
4+
const rollupUglify = require('rollup-plugin-uglify');
5+
const path = require('path');
6+
const pkg = require(path.join(process.cwd(), 'package.json'));
7+
const shouldMinify = process.argv.indexOf('--min') !== -1;
8+
const presetEs2015 = require('babel-preset-es2015-rollup');
9+
const babel = rollupBabel({
10+
presets: presetEs2015,
11+
});
12+
const plugins = [
13+
babel,
14+
rollupCommonjs(),
15+
rollupNodeResolve(),
16+
];
17+
18+
if (shouldMinify) {
19+
plugins.push(rollupUglify());
20+
}
21+
22+
const entry = pkg['jsnext:main'] || pkg.main || 'src/index.js';
23+
const moduleName = pkg['build:global'] || pkg.name;
24+
25+
module.exports = {
26+
dest: 'dist/index' + (shouldMinify ? '.min' : '') + '.js',
27+
entry,
28+
exports: 'named',
29+
format: 'umd',
30+
moduleName,
31+
plugins,
32+
sourceMap: true,
33+
useStrict: false,
34+
};

0 commit comments

Comments
 (0)