Convert to yarn

This commit is contained in:
Eric Schultz 2019-11-05 15:51:46 -06:00
parent cd2e75560c
commit 70da246773
9 changed files with 10937 additions and 23608 deletions

View file

@ -83,8 +83,8 @@ There are a number of steps for configuring your Houdini instance for startup
##### You SHOULD set your AMAZON s3 information (optional but STRONGLY recommended) ##### You SHOULD set your AMAZON s3 information (optional but STRONGLY recommended)
If you don't, file uploads WILL NOT WORK but it's not required. If you don't, file uploads WILL NOT WORK but it's not required.
##### In console 2, install npm packages ##### In console 2, install yarn
`./run npm install` `./run yarn`
##### In console 2, fill the db ##### In console 2, fill the db
`./run rake db:create db:structure:load db:seed test:prepare` `./run rake db:create db:structure:load db:seed test:prepare`
@ -100,7 +100,7 @@ If you need help setting up your mailer, visit `config/environment.rb` where the
`./dc up` `./dc up`
##### In console 2, run: ##### In console 2, run:
`./run npm run watch` `./run yarn watch`
##### You can go to http://localhost:5000 ##### You can go to http://localhost:5000

View file

@ -66,7 +66,7 @@ bundle exec rails server
```bash ```bash
# Console two (2) # Console two (2)
npm run watch yarn watch
# #### Notes #### # #### Notes ####
# If you get errors from running this command. # If you get errors from running this command.
# You'll need to manually run the following commands. # You'll need to manually run the following commands.

23592
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -8,14 +8,16 @@
"scripts": { "scripts": {
"watch": "export HOUDINI_WATCH=1; script/build.sh", "watch": "export HOUDINI_WATCH=1; script/build.sh",
"build": "script/build.sh", "build": "script/build.sh",
"build-all": "npm ci && script/compile-assets.sh && npm run build", "build-all": "yarn ci && script/compile-assets.sh && yarn build",
"ci-build-all": "script/compile-assets.sh && npm run build", "ci-build-all": "script/compile-assets.sh && yarn build",
"test": "rake -v spec && npm run build && npx jest", "test": "rake -v spec && yarn build && yarn jest",
"export-button-config": "bundle exec rake settings:generate_json", "export-button-config": "bundle exec rake settings:generate_json",
"export-i18n": "bundle exec rake settings:combine_translations", "export-i18n": "bundle exec rake settings:combine_translations",
"generate-openapi": "rake oapi:gen", "generate-openapi": "rake oapi:gen",
"get-codegen-cli": "script/download_codegen_cli.sh", "get-codegen-cli": "script/download_codegen_cli.sh",
"generate-api-js": "rm -rf javascripts/api && npm run get-codegen-cli && npm run generate-openapi && java -jar .bin/swagger-codegen-cli.jar generate -l 'typescript-jquery' -i tmp/openapi.json -o javascripts/api --config 'swagger.json' -t lib/swagger-typescript-jquery" "generate-api-js": "rm -rf javascripts/api && yarn get-codegen-cli && yarn generate-openapi && java -jar .bin/swagger-codegen-cli.jar generate -l 'typescript-jquery' -i tmp/openapi.json -o javascripts/api --config 'swagger.json' -t lib/swagger-typescript-jquery",
"jest": "jest",
"webpack": "webpack"
}, },
"devDependencies": { "devDependencies": {
"@types/color": "^3.0.0", "@types/color": "^3.0.0",

View file

@ -7,14 +7,14 @@ set -e
set -o pipefail set -o pipefail
export DATABASE_URL=${BUILD_DATABASE_URL:-postgres://admin:password@db/commitchange_development} export DATABASE_URL=${BUILD_DATABASE_URL:-postgres://admin:password@db/commitchange_development}
echo $DATABASE_URL echo $DATABASE_URL
npm run export-button-config && npm run export-i18n && npm run generate-api-js yarn export-button-config && yarn export-i18n && yarn generate-api-js
if [ -n "$HOUDINI_WATCH" ]; if [ -n "$HOUDINI_WATCH" ];
then then
echo "we're gonna watch!!!" echo "we're gonna watch!!!"
npx webpack --watch yarn webpack --watch
else else
echo "we're gonna build!!!" echo "we're gonna build!!!"
NODE_ENV=production npx webpack -p NODE_ENV=production yarn webpack -p
fi fi
) )

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
curl -sL https://deb.nodesource.com/setup_13.x | bash - curl -sL https://deb.nodesource.com/setup_13.x | bash -
apt-get update -qq && apt-get install -y nodejs curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
npm install npm@^6 -g echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update -qq && apt-get install -y nodejs yarn

View file

@ -4,5 +4,8 @@ set -e
curl -sL https://deb.nodesource.com/setup_13.x | bash - curl -sL https://deb.nodesource.com/setup_13.x | bash -
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs postgresql-9.6 default-jre
npm install npm@^6 -g curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs postgresql-9.6 default-jre yarn

View file

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
npm ci && rake db:create db:structure:load db:migrate && RAILS_ENV=test rake db:create db:structure:load test:prepare && rake spec && npm run build-all && npx jest yarn ci && rake db:create db:structure:load db:migrate && RAILS_ENV=test rake db:create db:structure:load test:prepare && rake spec && yarn run build-all && yarn jest

10914
yarn.lock Normal file

File diff suppressed because it is too large Load diff