mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 03:50:27 +08:00
Enforce "yarn install" usage and add yarn lockfile (#615)
This commit is contained in:
parent
dbe8d28a2f
commit
fe56f935b9
6
.electron-vue/preinstall.js
Normal file
6
.electron-vue/preinstall.js
Normal 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)
|
||||
}
|
@ -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()
|
||||
)
|
||||
}
|
||||
|
||||
|
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@ -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
|
||||
|
||||
|
@ -46,7 +46,7 @@ install:
|
||||
- npm --version
|
||||
- yarn --version
|
||||
|
||||
- yarn
|
||||
- yarn install --frozen-lockfile
|
||||
|
||||
script:
|
||||
- yarn run lint
|
||||
|
@ -28,7 +28,7 @@ install:
|
||||
- npm --version
|
||||
- yarn --version
|
||||
|
||||
- yarn
|
||||
- yarn install --frozen-lockfile
|
||||
|
||||
cache:
|
||||
- node_modules
|
||||
|
17925
package-lock.json
generated
17925
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user