Merge branch 'feat/yarn' into rails-v5
This commit is contained in:
commit
90843f215f
9 changed files with 10937 additions and 23608 deletions
|
@ -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)
|
||||
If you don't, file uploads WILL NOT WORK but it's not required.
|
||||
|
||||
##### In console 2, install npm packages
|
||||
`./run npm install`
|
||||
##### In console 2, install yarn
|
||||
`./run yarn`
|
||||
|
||||
##### In console 2, fill the db
|
||||
`./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`
|
||||
|
||||
##### In console 2, run:
|
||||
`./run npm run watch`
|
||||
`./run yarn watch`
|
||||
|
||||
##### You can go to http://localhost:5000
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ bundle exec rails server
|
|||
|
||||
```bash
|
||||
# Console two (2)
|
||||
npm run watch
|
||||
yarn watch
|
||||
# #### Notes ####
|
||||
# If you get errors from running this command.
|
||||
# You'll need to manually run the following commands.
|
||||
|
|
23592
package-lock.json
generated
23592
package-lock.json
generated
File diff suppressed because it is too large
Load diff
10
package.json
10
package.json
|
@ -8,14 +8,16 @@
|
|||
"scripts": {
|
||||
"watch": "export HOUDINI_WATCH=1; script/build.sh",
|
||||
"build": "script/build.sh",
|
||||
"build-all": "npm ci && script/compile-assets.sh && npm run build",
|
||||
"ci-build-all": "script/compile-assets.sh && npm run build",
|
||||
"test": "rake -v spec && npm run build && npx jest",
|
||||
"build-all": "yarn ci && script/compile-assets.sh && yarn build",
|
||||
"ci-build-all": "script/compile-assets.sh && yarn build",
|
||||
"test": "rake -v spec && yarn build && yarn jest",
|
||||
"export-button-config": "bundle exec rake settings:generate_json",
|
||||
"export-i18n": "bundle exec rake settings:combine_translations",
|
||||
"generate-openapi": "rake oapi:gen",
|
||||
"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": {
|
||||
"@types/color": "^3.0.0",
|
||||
|
|
|
@ -7,14 +7,14 @@ set -e
|
|||
set -o pipefail
|
||||
export DATABASE_URL=${BUILD_DATABASE_URL:-postgres://admin:password@db/commitchange_development}
|
||||
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" ];
|
||||
then
|
||||
echo "we're gonna watch!!!"
|
||||
npx webpack --watch
|
||||
yarn webpack --watch
|
||||
else
|
||||
echo "we're gonna build!!!"
|
||||
NODE_ENV=production npx webpack -p
|
||||
NODE_ENV=production yarn webpack -p
|
||||
fi
|
||||
)
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
curl -sL https://deb.nodesource.com/setup_13.x | bash -
|
||||
apt-get update -qq && apt-get install -y nodejs
|
||||
npm install npm@^6 -g
|
||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||
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
|
||||
|
|
|
@ -4,5 +4,8 @@ set -e
|
|||
curl -sL https://deb.nodesource.com/setup_13.x | bash -
|
||||
|
||||
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
|
|
@ -1,2 +1,2 @@
|
|||
#!/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
|
Loading…
Reference in a new issue