diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..939cf6d1819 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,39 @@ +defaults: &defaults + docker: + - image: circleci/node:10.16 + +aliases: + - &restore_npm + restore_cache: + keys: + - cra-npm-{{ checksum "yarn.lock" }} + - &save_npm + save_cache: + paths: + - ./node_modules + - ./packages/*/node_modules + key: genesis-npm-{{ checksum "yarn.lock" }} + - &yarn_install + run: yarn install --frozen-lockfile + +version: 2.1 +jobs: + publish-package: + <<: *defaults + steps: + - checkout + - *restore_npm + - *yarn_install + - *save_npm + - run: yarn publish-package + +workflows: + version: 2.1 + publish_to_private_registry: + jobs: + - publish-package: + filters: + branches: + ignore: /.*/ + tags: + only: /^v\d+\.\d+\.\d+(\.[a-zA-Z]+)?/ \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8153cffe3e2..0b399ec72be 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -103,9 +103,7 @@ labels: 'issue: bug report, needs triage' (Write your steps here:) -1. -2. -3. +1. 2. 3. ### Expected behavior diff --git a/package.json b/package.json index 92a9291ecb3..6f083023068 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "alex": "alex .", "test": "cd packages/react-scripts && node bin/react-scripts.js test", "format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'", - "compile:lockfile": "node tasks/compile-lockfile.js" + "compile:lockfile": "node tasks/compile-lockfile.js", + "publish-package": "yarn workspace @everlong/league-react-scripts publish-package" }, "devDependencies": { "@testing-library/jest-dom": "^4.2.0", diff --git a/packages/react-scripts/.npmrc b/packages/react-scripts/.npmrc new file mode 100644 index 00000000000..203f1b133b3 --- /dev/null +++ b/packages/react-scripts/.npmrc @@ -0,0 +1,5 @@ +@everlong:registry=https://us-central1-npm.pkg.dev/uplifted-triode-608/npm/ +//us-central1-npm.pkg.dev/uplifted-triode-608/npm/:_password="" +//us-central1-npm.pkg.dev/uplifted-triode-608/npm/:username=oauth2accesstoken +//us-central1-npm.pkg.dev/uplifted-triode-608/npm/:email=not.valid@email.com +//us-central1-npm.pkg.dev/uplifted-triode-608/npm/:always-auth=true \ No newline at end of file diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 25840d91148..1e9b44cdc2a 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -420,6 +420,16 @@ module.exports = function(webpackEnv) { }, }, ], + // START: EVERLONG CHANGES + [ + require.resolve('babel-plugin-styled-components'), + { + fileName: false, + preprocess: false, + displayName: true, + }, + ], + // END: EVERLONG CHANGES ], // This is a feature of `babel-loader` for webpack (not Babel itself). // It enables caching results in ./node_modules/.cache/babel-loader/ diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 63e7faf390c..5dfa75954ef 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -1,18 +1,19 @@ { - "name": "react-scripts", + "name": "@everlong/league-react-scripts", "version": "3.4.1", - "description": "Configuration and scripts for Create React App.", + "description": "Everlong configuration and scripts for Create React App.", "repository": { "type": "git", - "url": "https://github.com/facebook/create-react-app.git", + "url": "git@github.com:EverlongProject/create-react-app.git", "directory": "packages/react-scripts" }, + "private": false, "license": "MIT", "engines": { "node": ">=8.10" }, "bugs": { - "url": "https://github.com/facebook/create-react-app/issues" + "url": "git@github.com:EverlongProject/create-react-app/issues" }, "files": [ "bin", @@ -23,6 +24,9 @@ "template-typescript", "utils" ], + "scripts": { + "publish-package": "echo $GOOGLE_AUTH_B64 | base64 --decode > .google_creds && GOOGLE_APPLICATION_CREDENTIALS=.google_creds npx google-artifactregistry-auth .npmrc && rm -f .google_creds && yarn publish" + }, "bin": { "react-scripts": "./bin/react-scripts.js" }, @@ -32,6 +36,7 @@ "@svgr/webpack": "4.3.3", "@typescript-eslint/eslint-plugin": "^2.10.0", "@typescript-eslint/parser": "^2.10.0", + "babel-plugin-styled-components": "1.10.6", "babel-eslint": "10.1.0", "babel-jest": "^24.9.0", "babel-loader": "8.1.0",