Introduce yarn
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -12,7 +12,6 @@ enq.md
 | 
			
		||||
app/.tkn
 | 
			
		||||
app/node_modules
 | 
			
		||||
app/js/login/tkn.js
 | 
			
		||||
app/package-lock.json
 | 
			
		||||
app/view/en
 | 
			
		||||
app/view/ja
 | 
			
		||||
app/view/de
 | 
			
		||||
 
 | 
			
		||||
@@ -5,13 +5,15 @@ os:
 | 
			
		||||
language: node_js
 | 
			
		||||
node_js:
 | 
			
		||||
- '10.15.2'
 | 
			
		||||
cache:
 | 
			
		||||
  yarn: true
 | 
			
		||||
script: node -v
 | 
			
		||||
before_deploy:
 | 
			
		||||
  - npm install electron-builder -g
 | 
			
		||||
  - yarn install electron-builder -g
 | 
			
		||||
  - cd app
 | 
			
		||||
  - VERSION=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
 | 
			
		||||
  - npm install
 | 
			
		||||
  - npm run construct
 | 
			
		||||
  - yarn install
 | 
			
		||||
  - yarn construct
 | 
			
		||||
  - if [ "$TRAVIS_OS_NAME" = "osx" ];then electron-builder --mac -p never;else :;fi
 | 
			
		||||
  - if [ "$TRAVIS_OS_NAME" = "linux" ];then electron-builder --linux --x64 -p never;else :;fi
 | 
			
		||||
  - if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../build;else :;fi
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								README.md
									
									
									
									
									
								
							@@ -80,6 +80,10 @@ Fellow coder
 | 
			
		||||
 | 
			
		||||
## Build
 | 
			
		||||
 | 
			
		||||
You have to use either **npm** or **yarn**. Whichever you use, it works well.
 | 
			
		||||
 | 
			
		||||
### npm
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
git clone https://github.com/cutls/TheDesk
 | 
			
		||||
cd TheDesk/app
 | 
			
		||||
@@ -88,8 +92,21 @@ npm install --only=dev
 | 
			
		||||
npm run construct
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### yarn
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
git clone https://github.com/cutls/TheDesk
 | 
			
		||||
cd TheDesk/app
 | 
			
		||||
yarn install
 | 
			
		||||
yarn construct
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
run `npm run dev` or `yarn dev` to launch developer version with console(click `view`)
 | 
			
		||||
 | 
			
		||||
### electron-builder(Recommended)
 | 
			
		||||
Use npm scripts.  
 | 
			
		||||
Use scripts(they can work well with npm, **yarn**).  
 | 
			
		||||
 | 
			
		||||
#### npm
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
# Build for current platform
 | 
			
		||||
@@ -103,6 +120,21 @@ npm run build:win
 | 
			
		||||
npm run build:all
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### yarn
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
# Build for current platform
 | 
			
		||||
yarn build
 | 
			
		||||
 | 
			
		||||
# Select build target
 | 
			
		||||
## Windows
 | 
			
		||||
yarn build:win
 | 
			
		||||
 | 
			
		||||
## Windows and Linux (The macOS target should run on macOS. So, this option hasn't include the build for macOS)
 | 
			
		||||
yarn build:all
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Config is all on package.json  
 | 
			
		||||
 | 
			
		||||
### electron-packager
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										31
									
								
								README_ja.md
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								README_ja.md
									
									
									
									
									
								
							@@ -79,6 +79,9 @@ Linuxビルダー
 | 
			
		||||
 | 
			
		||||
## ビルド
 | 
			
		||||
 | 
			
		||||
npmでもyarnでも好きな方を選んでください。
 | 
			
		||||
 | 
			
		||||
### npm
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
git clone https://github.com/cutls/TheDesk
 | 
			
		||||
@@ -88,8 +91,20 @@ npm install --only=dev
 | 
			
		||||
npm run construct
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### yarn
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
git clone https://github.com/cutls/TheDesk
 | 
			
		||||
cd TheDesk/app
 | 
			
		||||
yarn install
 | 
			
		||||
yarn construct
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### electron-builder(推奨)
 | 
			
		||||
npm scriptsを利用します
 | 
			
		||||
 | 
			
		||||
scriptsを利用します
 | 
			
		||||
 | 
			
		||||
#### npm
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
# 実行している環境向けにビルド
 | 
			
		||||
@@ -103,6 +118,20 @@ npm run build:win
 | 
			
		||||
npm run build:all
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### yarn
 | 
			
		||||
 | 
			
		||||
```sh
 | 
			
		||||
# 実行している環境向けにビルド
 | 
			
		||||
yarn build
 | 
			
		||||
 | 
			
		||||
# ターゲットを指定してビルド
 | 
			
		||||
## Windows
 | 
			
		||||
yarn build:win
 | 
			
		||||
 | 
			
		||||
## macOS向けのビルドにはmacOSで実行する必要があるためこのコマンドではビルドされません
 | 
			
		||||
yarn build:all
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
ビルド設定はすべてpackage.jsonに記載しています。  
 | 
			
		||||
 | 
			
		||||
### electron-packager(非推奨)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2749
									
								
								app/yarn.lock
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2749
									
								
								app/yarn.lock
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user