mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 14:20:52 +01:00
Update build
This commit is contained in:
parent
8ad3c84dd6
commit
064f552c88
11
.browserslistrc
Normal file
11
.browserslistrc
Normal file
@ -0,0 +1,11 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 1 Chrome version
|
||||
last 1 Firefox version
|
||||
last 1 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
5
craco.config.js
Normal file
5
craco.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
eslint: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
57
package-lock.json
generated
57
package-lock.json
generated
@ -1152,6 +1152,55 @@
|
||||
"minimist": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"@craco/craco": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@craco/craco/-/craco-6.3.0.tgz",
|
||||
"integrity": "sha512-SCnfEQxT/6NAbU/3sIWw7gQXtzjjiTp/EZFdJTd8inPURILIy0YajrC2p8qBG2KhFo5cwgOrEDyaGyAFvvuyuA==",
|
||||
"requires": {
|
||||
"cross-spawn": "^7.0.0",
|
||||
"lodash": "^4.17.15",
|
||||
"semver": "^7.3.2",
|
||||
"webpack-merge": "^4.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"requires": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
"which": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"path-key": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||
"requires": {
|
||||
"shebang-regex": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="
|
||||
},
|
||||
"which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@csstools/convert-colors": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz",
|
||||
@ -18810,6 +18859,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"webpack-merge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz",
|
||||
"integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==",
|
||||
"requires": {
|
||||
"lodash": "^4.17.15"
|
||||
}
|
||||
},
|
||||
"webpack-sources": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz",
|
||||
|
20
package.json
20
package.json
@ -3,6 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@craco/craco": "^6.3.0",
|
||||
"@nitrots/nitro-renderer": "file:../nitro-renderer",
|
||||
"animate.css": "^4.1.1",
|
||||
"classnames": "^2.3.1",
|
||||
@ -18,11 +19,10 @@
|
||||
"web-vitals": "^1.1.2"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node ./webpack-patcher.js",
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"start": "craco start",
|
||||
"build": "craco build",
|
||||
"build:prod": "npm i git+https://git@git.krews.org/nitro/nitro-renderer#dev && npm i && npm run build",
|
||||
"test": "react-scripts test",
|
||||
"test": "craco test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
@ -111,18 +111,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^5.14.1",
|
||||
"@testing-library/react": "^11.2.7",
|
||||
|
@ -24,6 +24,6 @@
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
"node_modules/@nitrots/nitro-renderer/src/**/*.ts",
|
||||
"node_modules/@nitrots/nitro-renderer/**/*.ts",
|
||||
]
|
||||
}
|
||||
|
@ -1,22 +0,0 @@
|
||||
const fs = require('fs');
|
||||
|
||||
function deleteLineFromFile(props)
|
||||
{
|
||||
const data = fs.readFileSync(props.path, 'utf-8');
|
||||
const array = data.split('\n');
|
||||
const value = array[props.lineToRemove.index - 1].trim();
|
||||
|
||||
if (value === props.lineToRemove.value)
|
||||
{
|
||||
array.splice(props.lineToRemove.index - 1, 1);
|
||||
|
||||
const newData = array.join('\n');
|
||||
|
||||
fs.writeFileSync(props.path, newData, 'utf-8');
|
||||
}
|
||||
}
|
||||
|
||||
deleteLineFromFile({
|
||||
path: 'node_modules/react-scripts/config/webpack.config.js',
|
||||
lineToRemove: { index: 406, value: 'include: paths.appSrc,' },
|
||||
});
|
Loading…
Reference in New Issue
Block a user