Rename *.es6 to *.js
*.es6 isn't standard naming, that was just an old cockpit-ism. All files are treated as ES6.
This commit is contained in:
parent
166fae695c
commit
27671ccf1d
5 changed files with 7 additions and 23 deletions
2
Makefile
2
Makefile
|
|
@ -21,7 +21,7 @@ LINGUAS=$(basename $(notdir $(wildcard po/*.po)))
|
||||||
|
|
||||||
po/POTFILES.js.in:
|
po/POTFILES.js.in:
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
find src/ -name '*.js' -o -name '*.jsx' -o -name '*.es6' > $@
|
find src/ -name '*.js' -o -name '*.jsx' > $@
|
||||||
|
|
||||||
po/$(PACKAGE_NAME).js.pot: po/POTFILES.js.in
|
po/$(PACKAGE_NAME).js.pot: po/POTFILES.js.in
|
||||||
xgettext --default-domain=cockpit --output=$@ --language=C --keyword= \
|
xgettext --default-domain=cockpit --output=$@ --language=C --keyword= \
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ or
|
||||||
# Running eslint
|
# Running eslint
|
||||||
|
|
||||||
Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check
|
Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check
|
||||||
JavaScript code style in `.jsx` and `.es6` files.
|
JavaScript code style in `.js` and `.jsx` files.
|
||||||
|
|
||||||
The linter is executed within every build as a webpack preloader.
|
The linter is executed within every build as a webpack preloader.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"watch": "webpack --watch",
|
"watch": "webpack --watch",
|
||||||
"build": "webpack",
|
"build": "webpack",
|
||||||
"eslint": "eslint --ext .jsx --ext .es6 src/",
|
"eslint": "eslint --ext .js --ext .jsx src/",
|
||||||
"eslint:fix": "eslint --fix --ext .jsx --ext .es6 src/"
|
"eslint:fix": "eslint --fix --ext .js --ext .jsx src/"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.0.0",
|
"@babel/core": "^7.0.0",
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ var production = process.env.NODE_ENV === 'production';
|
||||||
var info = {
|
var info = {
|
||||||
entries: {
|
entries: {
|
||||||
"index": [
|
"index": [
|
||||||
"./index.es6"
|
"./index.js"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
files: [
|
files: [
|
||||||
|
|
@ -125,28 +125,12 @@ module.exports = {
|
||||||
enforce: 'pre',
|
enforce: 'pre',
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
loader: 'eslint-loader',
|
loader: 'eslint-loader',
|
||||||
test: /\.jsx$/
|
test: /\.(js|jsx)$/
|
||||||
},
|
|
||||||
{
|
|
||||||
enforce: 'pre',
|
|
||||||
exclude: /node_modules/,
|
|
||||||
loader: 'eslint-loader',
|
|
||||||
test: /\.es6$/
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: babel_loader,
|
use: babel_loader,
|
||||||
test: /\.js$/
|
test: /\.(js|jsx)$/
|
||||||
},
|
|
||||||
{
|
|
||||||
exclude: /node_modules/,
|
|
||||||
use: babel_loader,
|
|
||||||
test: /\.jsx$/
|
|
||||||
},
|
|
||||||
{
|
|
||||||
exclude: /node_modules/,
|
|
||||||
use: babel_loader,
|
|
||||||
test: /\.es6$/
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue