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

Commit c9ebb09

Browse files
authored
chore: update dependencies
* chore: update eslint and build config * chore: update dependencies * fix: fix unit test of clipboard * chore: update config files * chore: update to webpack 4 * chore: rename packages.json * chore: rename @oui-angular to @ovh-ui * chore: update for yarn workspaces
1 parent f943398 commit c9ebb09

File tree

107 files changed

+2138
-1451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+2138
-1451
lines changed

.editorconfig

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
15
root = true
26

7+
38
[*]
4-
charset = utf-8
9+
10+
# Change these settings to your own preference
511
indent_style = space
612
indent_size = 4
13+
14+
# We recommend you to keep these unchanged
715
end_of_line = lf
8-
insert_final_newline = true
16+
charset = utf-8
917
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.js]
21+
indent_style = space
22+
indent_size = 2
23+
24+
[*.less]
25+
indent_style = space
26+
indent_size = 2
27+
28+
[*.md]
29+
trim_trailing_whitespace = false
30+
31+
[package.json]
32+
indent_style = space
33+
indent_size = 2

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
node_modules

.eslintrc.js

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
1-
const isDistribution = process.env.NODE_ENV === "dist"
1+
const isDistribution = process.env.NODE_ENV === "dist";
22

33
module.exports = {
4-
"root": true,
5-
"parser": "babel-eslint",
6-
"parserOptions": {
7-
"sourceType": "module"
8-
},
9-
"env": {
10-
"browser": true,
11-
"node": true,
12-
"jasmine": true,
13-
"es6": true
14-
},
15-
"globals": {
16-
"angular": true,
17-
"inject": true
18-
},
19-
"extends": "ovh",
4+
"root": true,
5+
"parser": "babel-eslint",
6+
"parserOptions": {
7+
"sourceType": "module"
8+
},
9+
"env": {
10+
"browser": true,
11+
"node": true,
12+
"jasmine": true,
13+
"es6": true
14+
},
15+
"globals": {
16+
"angular": true,
17+
"inject": true
18+
},
19+
"extends": "ovh",
20+
"rules": {
21+
"arrow-parens": 0,
22+
"generator-star-spacing": 0,
23+
"no-console": isDistribution ? 2 : 0,
24+
"no-debugger": isDistribution ? 2 : 0,
25+
"no-magic-numbers": ["error", { "ignore": [0, -1, 1] }]
26+
},
27+
"overrides": {
28+
"files": "*.spec.js",
2029
"rules": {
21-
"arrow-parens": 0,
22-
"generator-star-spacing": 0,
23-
"no-console": isDistribution ? 2 : 0,
24-
"no-debugger": isDistribution ? 2 : 0,
25-
"no-magic-numbers": ["error", {
26-
"ignore": [0, -1, 1]
27-
}]
28-
},
29-
"overrides": {
30-
"files": "*.spec.js",
31-
"rules": {
32-
"no-magic-numbers": false,
33-
"no-underscore-dangle": false,
34-
"no-empty-function": false
35-
}
30+
"no-magic-numbers": false,
31+
"no-underscore-dangle": false,
32+
"no-empty-function": false
3633
}
37-
}
34+
}
35+
};

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# JS files must always use LF for tools to work
5+
*.js eol=lf
6+
7+
*.png binary
8+
*.jpg binary

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

build/karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// we are also using it with karma-webpack
44
// https://github.com/webpack/karma-webpack
55

6-
import webpackConfig from "./webpack.test.babel";
6+
const webpackConfig = require("./webpack.test.config");
77

8-
export default config => {
8+
module.exports = function (config) {
99
config.set({
1010
// to run in additional browsers:
1111
// 1. install corresponding karma launcher

build/webpack.base.babel.js renamed to build/webpack.base.config.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
1-
import formatter from "eslint-friendly-formatter";
2-
import path from "path";
3-
import webpack from "webpack";
4-
import LodashModuleReplacementPlugin from "lodash-webpack-plugin";
1+
const formatter = require("eslint-friendly-formatter");
2+
const webpack = require("webpack");
3+
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
54

65
const exclude = [/node_modules/, /dist/];
76

8-
export default {
7+
module.exports = {
8+
mode: "development",
99
entry: {
1010
component: ["./packages/oui-angular/src/index.js"]
1111
},
12-
resolve: {
13-
extensions: [".js", ".json"],
14-
alias: {
15-
"@oui-angular": path.resolve(__dirname, "../packages")
16-
}
17-
},
1812
plugins: [
1913
new webpack.DefinePlugin({
2014
"process.env": process.env.NODE_ENV
2115
}),
2216
new LodashModuleReplacementPlugin({
2317
shorthands: true,
2418
paths: true
25-
}), // Save bytes on Lodash
19+
})
2620
],
2721
module: {
2822
rules: [

build/webpack.dist.babel.js

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

build/webpack.dist.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const baseConfig = require("./webpack.base.config");
2+
const merge = require("webpack-merge");
3+
const path = require("path");
4+
const webpack = require("webpack");
5+
6+
module.exports = merge(baseConfig, {
7+
mode: "production",
8+
devtool: "source-map",
9+
externals: {
10+
clipboard: "clipboard",
11+
"escape-string-regexp": "escape-string-regexp",
12+
flatpickr: "flatpickr",
13+
"popper.js": "popper.js"
14+
},
15+
output: {
16+
path: path.resolve(".", "dist"),
17+
filename: "oui-angular.min.js"
18+
},
19+
performance: {
20+
hints: false
21+
},
22+
plugins: [
23+
new webpack.DefinePlugin({
24+
"process.env": process.env.NODE_ENV
25+
}),
26+
new webpack.optimize.ModuleConcatenationPlugin() // Enable scope hoisting
27+
]
28+
});

build/webpack.test.babel.js

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

0 commit comments

Comments
 (0)