Enforce "yarn install" usage and add yarn lockfile (#615)

This commit is contained in:
Felix Häusler 2018-12-17 15:11:17 +01:00 committed by Ran Luo
parent dbe8d28a2f
commit fe56f935b9
8 changed files with 11624 additions and 17932 deletions

View File

@ -0,0 +1,6 @@
'use strict'
if (!/yarn\.js$/.test(process.env.npm_execpath)) {
console.error('Please use yarn to install dependencies.\n')
process.exit(1)
}

View File

@ -147,7 +147,6 @@ const rendererConfig = {
? path.resolve(__dirname, '../node_modules')
: false
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
new VueLoaderPlugin()
],
@ -174,7 +173,8 @@ if (process.env.NODE_ENV !== 'production') {
rendererConfig.plugins.push(
new webpack.DefinePlugin({
'__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`
})
}),
new webpack.HotModuleReplacementPlugin()
)
}

View File

@ -73,18 +73,18 @@ If there are conflicts or you want to update your local branch, please do the fo
Before you can get started developing, you need set up your build envoriment:
- git
- Node.js and npm
- Node.js, npm and yarn
- C++ compiler and development tools
**Additional development dependencies on Linux:**
On Debian-based Linux: `sudo apt-get install libx11-dev libxkbfile-dev`
On Red Hat-based Linux: `sudo yum install libx11-devel libxkbfile-devel`
On Red Hat-based Linux: `sudo dnf install libx11-devel libxkbfile-devel`
**Let's build:**
1. Go to `marktext` folder
2. Install dependencies: `npm install`
2. Install dependencies: `yarn install` or `yarn install --frozen-lockfile`
3. Build Mark Text: `npm run build`
4. Mark Text binary is located under `build` folder

View File

@ -46,7 +46,7 @@ install:
- npm --version
- yarn --version
- yarn
- yarn install --frozen-lockfile
script:
- yarn run lint

View File

@ -28,7 +28,7 @@ install:
- npm --version
- yarn --version
- yarn
- yarn install --frozen-lockfile
cache:
- node_modules

17925
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,7 @@
"pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js",
"test": "npm run unit && npm run e2e",
"unit": "cross-env NODE_ENV=test karma start test/unit/karma.conf.js",
"preinstall": "node .electron-vue/preinstall.js",
"postinstall": "npm run rebuild && npm run lint:fix",
"build:muya": "cd src/muya && webpack --progress --colors --config webpack.config.js",
"release:muya": "npm run build:muya && cd src/muya && npm publish",

11610
yarn.lock Normal file

File diff suppressed because it is too large Load Diff