Browse Source

added editorconfig + fix linting and title

Skylsmoi 6 years ago
parent
commit
2ac45ba166
4 changed files with 25 additions and 13 deletions
  1. 13 0
      .editorconfig
  2. 1 1
      dist/index.html
  3. 1 2
      package.json
  4. 10 10
      webpack.config.js

+ 13 - 0
.editorconfig View File

@@ -0,0 +1,13 @@
1
+# doc here : https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
2
+root = true
3
+
4
+[*]
5
+indent_style = space
6
+indent_size = 2
7
+end_of_line = lf
8
+charset = utf-8
9
+insert_final_newline = true
10
+trim_trailing_whitespace = true
11
+
12
+[*.py]
13
+indent_size = 4

+ 1 - 1
dist/index.html View File

@@ -3,7 +3,7 @@
3 3
 <head>
4 4
   <meta charset='utf-8' />
5 5
   <meta name="viewport" content="width=device-width, user-scalable=no" />
6
-  <title>Tracim App PageHtml</title>
6
+  <title>PageHtml App Tracim</title>
7 7
   <link rel='shortcut icon' href='favicon.ico'>
8 8
 
9 9
   <link rel="stylesheet" type="text/css" href="./font/font-awesome-4.7.0/css/font-awesome.css">

+ 1 - 2
package.json View File

@@ -1,10 +1,9 @@
1 1
 {
2
-  "name": "tracim_plugin_pagehtml",
2
+  "name": "tracim_app_pagehtml",
3 3
   "version": "1.1.2",
4 4
   "description": "",
5 5
   "main": "index.js",
6 6
   "scripts": {
7
-    "mockapi": "node jsonserver/server.js",
8 7
     "servdev": "NODE_ENV=development webpack-dev-server --watch --colors --inline --hot --progress",
9 8
     "servdev-dashboard": "NODE_ENV=development webpack-dashboard -m -p 9871 -- webpack-dev-server --watch --colors --inline --hot --progress",
10 9
     "build": "NODE_ENV=production webpack -p",

+ 10 - 10
webpack.config.js View File

@@ -11,17 +11,17 @@ module.exports = {
11 11
     filename: isProduction ? 'pageHtml.app.js' : 'pageHtml.app.dev.js',
12 12
     pathinfo: !isProduction,
13 13
     library: isProduction ? 'appPageHtml' : undefined,
14
-    libraryTarget: isProduction ? 'var' : undefined,
14
+    libraryTarget: isProduction ? 'var' : undefined
15 15
   },
16 16
   externals: {},
17
-    // isProduction ? { // Côme - since plugins are imported through <script>, cannot externalize libraries
18
-    //   react: {commonjs: 'react', commonjs2: 'react', amd: 'react', root: '_'},
19
-    //   'react-dom': {commonjs: 'react-dom', commonjs2: 'react-dom', amd: 'react-dom', root: '_'},
20
-    //   classnames: {commonjs: 'classnames', commonjs2: 'classnames', amd: 'classnames', root: '_'},
21
-    //   'prop-types': {commonjs: 'prop-types', commonjs2: 'prop-types', amd: 'prop-types', root: '_'},
22
-    //   tracim_lib: {commonjs: 'tracim_lib', commonjs2: 'tracim_lib', amd: 'tracim_lib', root: '_'}
23
-    // }
24
-    // : {},
17
+  // isProduction ? { // Côme - since plugins are imported through <script>, cannot externalize libraries
18
+  //   react: {commonjs: 'react', commonjs2: 'react', amd: 'react', root: '_'},
19
+  //   'react-dom': {commonjs: 'react-dom', commonjs2: 'react-dom', amd: 'react-dom', root: '_'},
20
+  //   classnames: {commonjs: 'classnames', commonjs2: 'classnames', amd: 'classnames', root: '_'},
21
+  //   'prop-types': {commonjs: 'prop-types', commonjs2: 'prop-types', amd: 'prop-types', root: '_'},
22
+  //   tracim_lib: {commonjs: 'tracim_lib', commonjs2: 'tracim_lib', amd: 'tracim_lib', root: '_'}
23
+  // }
24
+  // : {},
25 25
   devServer: {
26 26
     contentBase: path.join(__dirname, 'dist/'),
27 27
     port: 8071,
@@ -68,7 +68,7 @@ module.exports = {
68 68
   resolve: {
69 69
     extensions: ['.js', '.jsx']
70 70
   },
71
-  plugins:[
71
+  plugins: [
72 72
     ...[], // generic plugins always present
73 73
     ...(isProduction
74 74
       ? [ // production specific plugins