build: switch to yarn and update some dependencies (#5568)
This commit is contained in:
Родитель
fccfa8f220
Коммит
3cf389c594
|
@ -14,7 +14,7 @@ jobs:
|
|||
- uses: actions/setup-node@v2.2.0
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- run: npm ci
|
||||
- run: yarn install --frozen-lockfile
|
||||
- name: Switch to update branch
|
||||
run: |
|
||||
if git branch --remotes | grep -q origin/update-data; then
|
||||
|
@ -29,7 +29,7 @@ jobs:
|
|||
run: |
|
||||
echo "machine github.com login $GITHUB_ACTOR password $GITHUB_TOKEN" > ~/.netrc
|
||||
chmod 600 ~/.netrc
|
||||
git add package.json package-lock.json
|
||||
git add package.json yarn.lock
|
||||
if test -n "$( git status -s)"; then
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "electron-bot@users.noreply.github.com"
|
||||
|
|
|
@ -26,8 +26,8 @@ jobs:
|
|||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn test
|
||||
env:
|
||||
CI: true
|
||||
|
||||
|
@ -48,7 +48,7 @@ jobs:
|
|||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- run: npm ci
|
||||
- run: npm run integration
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn run integration
|
||||
env:
|
||||
CI: true
|
||||
|
|
|
@ -6,7 +6,6 @@ npm-debug.log
|
|||
images/crushed
|
||||
.env
|
||||
css/**/*.css
|
||||
yarn.lock
|
||||
cypress/screenshots/*
|
||||
cypress/videos/*
|
||||
/precompiled/
|
||||
|
|
|
@ -72,7 +72,7 @@ Follow these steps to copy this repository to your computer and build the site:
|
|||
```bash
|
||||
git clone https://github.com/electron/electronjs.org
|
||||
cd electronjs.org
|
||||
npm install
|
||||
yarn install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
|
@ -83,7 +83,7 @@ You should now have an Express server running at
|
|||
|
||||
If there is an error building the `node-sass` dependency, try running `npm rebuild node-sass`.
|
||||
|
||||
**Note**: If errors are still shown after you have installed all the dependencies, try to delete the `node_modules` directory in your project and run `npm install` again.
|
||||
**Note**: If errors are still shown after you have installed all the dependencies, try to delete the `node_modules` directory in your project and run `yarn install` again.
|
||||
|
||||
Read on for more info about the structure of the site.
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ If you just want to get the site up and running locally, here's the TLDR:
|
|||
```
|
||||
git clone https://github.com/electron/electronjs.org
|
||||
cd electronjs.org
|
||||
npm install
|
||||
npm run dev
|
||||
yarn
|
||||
yarn dev
|
||||
```
|
||||
|
||||
For more info about how this site works and how to contribute, see
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -131,5 +131,8 @@
|
|||
"lint-staged": {
|
||||
"*.js": "npm run lint:js",
|
||||
"*.scss": "npm run lint:style"
|
||||
},
|
||||
"resolutions": {
|
||||
"node-sass-middleware/node-sass": "^6.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
npm install
|
||||
yarn install
|
|
@ -8,7 +8,7 @@ set -o nounset # fail on unset variables
|
|||
# clone the repo
|
||||
git clone https://github.com/electron/electronjs.org site
|
||||
cd site
|
||||
npm install
|
||||
yarn install
|
||||
|
||||
# configure git
|
||||
git config user.email "electron@github.com"
|
||||
|
|
|
@ -8,7 +8,7 @@ const packages = [
|
|||
]
|
||||
|
||||
const packagesString = packages.map((str) => `${str}@latest`).join(' ')
|
||||
const command = `npm install ${packagesString} --save-exact`
|
||||
const command = `yarn install ${packagesString} --exact`
|
||||
|
||||
console.time(`Running ${command}`)
|
||||
child_process.execSync(command, {
|
||||
|
|
|
@ -262,7 +262,7 @@ if (!module.parent) {
|
|||
app.listen(port, () => {
|
||||
console.log(`app running on http://localhost:${port}`)
|
||||
if (isProduction) {
|
||||
console.log(`If you're developing, you probably want \`npm run dev\`\n\n`)
|
||||
console.log(`If you're developing, you probably want \`yarn dev\`\n\n`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче