Skip to content

Commit

Permalink
fix(deploy): misc. re-arrange scripts and organize
Browse files Browse the repository at this point in the history
  • Loading branch information
raisedadead committed Jun 20, 2019
1 parent a6afaf1 commit c5fd478
Show file tree
Hide file tree
Showing 20 changed files with 5,031 additions and 43 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Expand Up @@ -29,8 +29,3 @@ jobs:
- stage: Unit and Integration tests - stage: Unit and Integration tests
script: npm test script: npm test


- stage: Artifacts builds
if: branch = master && type != pull_request
script: bash tools/scripts/builds/trigger-build.sh
install: skip
before_script: skip
3 changes: 2 additions & 1 deletion api-server/package.json
@@ -1,6 +1,7 @@
{ {
"name": "@freecodecamp/api-server", "name": "@freecodecamp/api-server",
"version": "0.1.0", "private": true,
"version": "0.0.1",
"repository": "freecodecamp/freecodecamp", "repository": "freecodecamp/freecodecamp",
"private": true, "private": true,
"main": "development-entry.js", "main": "development-entry.js",
Expand Down
3 changes: 2 additions & 1 deletion client/package.json
@@ -1,5 +1,6 @@
{ {
"name": "@freecodecamp/client", "name": "@freecodecamp/client",
"private": true,
"description": "The freeCodeCamp web client", "description": "The freeCodeCamp web client",
"version": "1.0.0", "version": "1.0.0",
"author": "freeCodeCamp <team@freecodecamp.org>", "author": "freeCodeCamp <team@freecodecamp.org>",
Expand Down Expand Up @@ -76,7 +77,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"clean": "gatsby clean", "clean": "gatsby clean",
"prebuild": "npm run build:workers && node ../tools/scripts/ensure-env.js", "prebuild": "npm run build:workers && node ../tools/scripts/build/ensure-env.js",
"build": "node --max_old_space_size=7168 node_modules/gatsby-cli build", "build": "node --max_old_space_size=7168 node_modules/gatsby-cli build",
"build:workers": "node --max_old_space_size=7168 node_modules/webpack-cli --env.production --config ./webpack-workers.js --progress", "build:workers": "node --max_old_space_size=7168 node_modules/webpack-cli --env.production --config ./webpack-workers.js --progress",
"predevelop": "npm run prebuild", "predevelop": "npm run prebuild",
Expand Down
1 change: 1 addition & 0 deletions client/plugins/fcc-create-nav-data/package.json
@@ -1,5 +1,6 @@
{ {
"name": "fcc-create-nav-data", "name": "fcc-create-nav-data",
"private": true,
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"test": "mocha -R spec \"./{,!(node_modules)/**/}*.test.js\"", "test": "mocha -R spec \"./{,!(node_modules)/**/}*.test.js\"",
Expand Down
6 changes: 5 additions & 1 deletion client/plugins/fcc-source-challenges/package.json
@@ -1 +1,5 @@
{"name": "fcc-source-challenges"} {
"name": "fcc-source-challenges",
"private": true,
"version": "0.0.1"
}
4 changes: 2 additions & 2 deletions client/plugins/gatsby-remark-fcc-forum-emoji/package.json
@@ -1,5 +1,5 @@
{ {
"name": "gatsby-remark-fcc-forum-emoji", "name": "gatsby-remark-fcc-forum-emoji",
"description": "A plugin to help fix the styling of forum emoji in the Guide", "private": true,
"main": "index.js" "version": "0.0.1"
} }
6 changes: 5 additions & 1 deletion client/plugins/gatsby-remark-node-identity/package.json
@@ -1 +1,5 @@
{"name": "gatsby-plugin-node-identity", "version": "0.1.0"} {
"name": "gatsby-plugin-node-identity",
"private": true,
"version": "0.0.1"
}
3 changes: 2 additions & 1 deletion lerna.json
Expand Up @@ -6,7 +6,8 @@
"curriculum", "curriculum",
"search-indexing", "search-indexing",
"tools/challenge-md-parser", "tools/challenge-md-parser",
"tools/scripts/seed" "tools/scripts/seed",
"tools/scripts/build"
], ],
"version": "independent" "version": "independent"
} }
10 changes: 6 additions & 4 deletions package.json
@@ -1,11 +1,13 @@
{ {
"name": "@freecodecamp/freecodecamp", "name": "@freecodecamp/freecodecamp",
"private": true,
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"bootstrap": "lerna bootstrap --ci", "bootstrap": "lerna bootstrap --ci",
"clean": "npm-run-all clean:client clean:all-deps", "clean": "npm-run-all clean:gatsby-site clean:packages",
"clean:all-deps": "lerna clean && shx rm -rf node_modules", "clean:root-deps": "shx rm -rf node_modules",
"clean:client": "cd ./client && npm run clean", "clean:packages": "lerna clean -y",
"clean:gatsby-site": "cd ./client && npm run clean",
"develop": "npm-run-all ensure-env -p develop:*", "develop": "npm-run-all ensure-env -p develop:*",
"develop:client": "cd ./client && npm run develop", "develop:client": "cd ./client && npm run develop",
"develop:server": "cd ./api-server && npm run develop", "develop:server": "cd ./api-server && npm run develop",
Expand All @@ -16,7 +18,7 @@
"docker:seed": "docker-compose run --rm freecodecamp npm run seed", "docker:seed": "docker-compose run --rm freecodecamp npm run seed",
"docker:test": "docker-compose -f docker-compose.tests.yml run --rm tests bash", "docker:test": "docker-compose -f docker-compose.tests.yml run --rm tests bash",
"docker:test:init": "docker-compose -f docker-compose.tests.yml run -u root --rm tests bash change_volumes_owner.sh", "docker:test:init": "docker-compose -f docker-compose.tests.yml run -u root --rm tests bash change_volumes_owner.sh",
"ensure-env": "cross-env DEBUG=fcc:* node ./tools/scripts/ensure-env.js", "ensure-env": "cross-env DEBUG=fcc:* node ./tools/scripts/build/ensure-env.js",
"format": "npm run lint -- --fix", "format": "npm run lint -- --fix",
"hooks:install": "node node_modules/husky/husky.js install", "hooks:install": "node node_modules/husky/husky.js install",
"hooks:uninstall": "node node_modules/husky/husky.js uninstall", "hooks:uninstall": "node node_modules/husky/husky.js uninstall",
Expand Down
1 change: 1 addition & 0 deletions search-indexing/package.json
@@ -1,5 +1,6 @@
{ {
"name": "@freecodecamp/search-indexing", "name": "@freecodecamp/search-indexing",
"private": true,
"version": "0.0.1", "version": "0.0.1",
"description": "A repository to hold all of our search assets", "description": "A repository to hold all of our search assets",
"main": "N/A", "main": "N/A",
Expand Down
3 changes: 2 additions & 1 deletion tools/challenge-md-parser/package.json
@@ -1,6 +1,7 @@
{ {
"name": "@freecodecamp/challenge-md-parser", "name": "@freecodecamp/challenge-md-parser",
"version": "1.0.0", "private": true,
"version": "0.0.1",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"publishConfig": { "publishConfig": {
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -2,10 +2,10 @@ const fs = require('fs');
const path = require('path'); const path = require('path');
const debug = require('debug'); const debug = require('debug');


const env = require('../../config/env'); const env = require('../../../config/env');


const { getChallengesForLang } = require('../../curriculum/getChallenges'); const { getChallengesForLang } = require('../../../curriculum/getChallenges');
const { createPathMigrationMap } = require('./seed/createPathMigrationMap'); const { createPathMigrationMap } = require('../seed/createPathMigrationMap');


const { createRedirects } = require('./createRedirects'); const { createRedirects } = require('./createRedirects');


Expand All @@ -20,10 +20,10 @@ const {
newsLocation: news newsLocation: news
} = env; } = env;


const apiPath = path.resolve(__dirname, '../../api-server'); const apiPath = path.resolve(__dirname, '../../../api-server');
const clientPath = path.resolve(__dirname, '../../client'); const clientPath = path.resolve(__dirname, '../../../client');
const clientStaticPath = path.resolve(clientPath, 'static'); const clientStaticPath = path.resolve(clientPath, 'static');
const globalConfigPath = path.resolve(__dirname, '../../config'); const globalConfigPath = path.resolve(__dirname, '../../../config');


if (NODE_ENV === 'production') { if (NODE_ENV === 'production') {
const redirects = createRedirects({ api, news, forum }); const redirects = createRedirects({ api, news, forum });
Expand Down
Expand Up @@ -2,8 +2,8 @@ const fs = require('fs');
const path = require('path'); const path = require('path');
const debug = require('debug'); const debug = require('debug');


const { getChallengesForLang } = require('../../curriculum/getChallenges'); const { getChallengesForLang } = require('../../../curriculum/getChallenges');
const { createPathMigrationMap } = require('./seed/createPathMigrationMap'); const { createPathMigrationMap } = require('../seed/createPathMigrationMap');


const log = debug('fcc:tools:ensure-env'); const log = debug('fcc:tools:ensure-env');


Expand Down

0 comments on commit c5fd478

Please sign in to comment.