fix(deploy): misc. re-arrange scripts and organize

This commit is contained in:
Mrugesh Mohapatra
2019-06-17 05:16:35 +05:30
committed by mrugesh
parent a6afaf1eb6
commit c5fd478d9a
20 changed files with 5031 additions and 43 deletions

View File

@ -29,8 +29,3 @@ jobs:
- stage: Unit and Integration tests
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

View File

@ -1,6 +1,7 @@
{
"name": "@freecodecamp/api-server",
"version": "0.1.0",
"private": true,
"version": "0.0.1",
"repository": "freecodecamp/freecodecamp",
"private": true,
"main": "development-entry.js",

View File

@ -1,5 +1,6 @@
{
"name": "@freecodecamp/client",
"private": true,
"description": "The freeCodeCamp web client",
"version": "1.0.0",
"author": "freeCodeCamp <team@freecodecamp.org>",
@ -76,7 +77,7 @@
"license": "MIT",
"scripts": {
"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:workers": "node --max_old_space_size=7168 node_modules/webpack-cli --env.production --config ./webpack-workers.js --progress",
"predevelop": "npm run prebuild",

View File

@ -1,5 +1,6 @@
{
"name": "fcc-create-nav-data",
"private": true,
"version": "0.0.1",
"scripts": {
"test": "mocha -R spec \"./{,!(node_modules)/**/}*.test.js\"",

View File

@ -1 +1,5 @@
{"name": "fcc-source-challenges"}
{
"name": "fcc-source-challenges",
"private": true,
"version": "0.0.1"
}

View File

@ -1,5 +1,5 @@
{
"name": "gatsby-remark-fcc-forum-emoji",
"description": "A plugin to help fix the styling of forum emoji in the Guide",
"main": "index.js"
"private": true,
"version": "0.0.1"
}

View File

@ -1 +1,5 @@
{"name": "gatsby-plugin-node-identity", "version": "0.1.0"}
{
"name": "gatsby-plugin-node-identity",
"private": true,
"version": "0.0.1"
}

View File

@ -6,7 +6,8 @@
"curriculum",
"search-indexing",
"tools/challenge-md-parser",
"tools/scripts/seed"
"tools/scripts/seed",
"tools/scripts/build"
],
"version": "independent"
}

View File

@ -1,11 +1,13 @@
{
"name": "@freecodecamp/freecodecamp",
"private": true,
"version": "0.0.1",
"scripts": {
"bootstrap": "lerna bootstrap --ci",
"clean": "npm-run-all clean:client clean:all-deps",
"clean:all-deps": "lerna clean && shx rm -rf node_modules",
"clean:client": "cd ./client && npm run clean",
"clean": "npm-run-all clean:gatsby-site clean:packages",
"clean:root-deps": "shx rm -rf node_modules",
"clean:packages": "lerna clean -y",
"clean:gatsby-site": "cd ./client && npm run clean",
"develop": "npm-run-all ensure-env -p develop:*",
"develop:client": "cd ./client && npm run develop",
"develop:server": "cd ./api-server && npm run develop",
@ -16,7 +18,7 @@
"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: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",
"hooks:install": "node node_modules/husky/husky.js install",
"hooks:uninstall": "node node_modules/husky/husky.js uninstall",

View File

@ -1,5 +1,6 @@
{
"name": "@freecodecamp/search-indexing",
"private": true,
"version": "0.0.1",
"description": "A repository to hold all of our search assets",
"main": "N/A",

View File

@ -1,6 +1,7 @@
{
"name": "@freecodecamp/challenge-md-parser",
"version": "1.0.0",
"private": true,
"version": "0.0.1",
"description": "",
"main": "index.js",
"publishConfig": {

View File

@ -2,10 +2,10 @@ const fs = require('fs');
const path = require('path');
const debug = require('debug');
const env = require('../../config/env');
const env = require('../../../config/env');
const { getChallengesForLang } = require('../../curriculum/getChallenges');
const { createPathMigrationMap } = require('./seed/createPathMigrationMap');
const { getChallengesForLang } = require('../../../curriculum/getChallenges');
const { createPathMigrationMap } = require('../seed/createPathMigrationMap');
const { createRedirects } = require('./createRedirects');
@ -20,10 +20,10 @@ const {
newsLocation: news
} = env;
const apiPath = path.resolve(__dirname, '../../api-server');
const clientPath = path.resolve(__dirname, '../../client');
const apiPath = path.resolve(__dirname, '../../../api-server');
const clientPath = path.resolve(__dirname, '../../../client');
const clientStaticPath = path.resolve(clientPath, 'static');
const globalConfigPath = path.resolve(__dirname, '../../config');
const globalConfigPath = path.resolve(__dirname, '../../../config');
if (NODE_ENV === 'production') {
const redirects = createRedirects({ api, news, forum });

View File

@ -2,8 +2,8 @@ const fs = require('fs');
const path = require('path');
const debug = require('debug');
const { getChallengesForLang } = require('../../curriculum/getChallenges');
const { createPathMigrationMap } = require('./seed/createPathMigrationMap');
const { getChallengesForLang } = require('../../../curriculum/getChallenges');
const { createPathMigrationMap } = require('../seed/createPathMigrationMap');
const log = debug('fcc:tools:ensure-env');

4966
tools/scripts/build/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
{
"name": "@freecodecamp/scripts-build",
"private": true,
"version": "0.0.1",
"description": "Build Scripts",
"main": "NA",
"scripts": {
"test": "jest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/freeCodeCamp/freeCodeCamp.git"
},
"author": "freeCodeCamp.org",
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/freeCodeCamp/freeCodeCamp/issues"
},
"homepage": "https://github.com/freeCodeCamp/freeCodeCamp#readme",
"devDependencies": {
"debug": "^4.0.1",
"dotenv": "^6.0.0",
"jest": "^24.8.0"
}
}

View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
pushd "$TRAVIS_BUILD_DIR"
if [ -n "$DOCKER_PUSH_API_TOKEN" ]
then
git clone https://github.com/"$DOCKER_PUSH_REPO".git docker-push-repo
cd docker-push-repo
git submodule update --init --remote --recursive
git submodule status
git add freecodecamp
git -c user.name="$DOCKER_PUSH_USER" -c user.email='travis' \
commit -m 'chore(ci): Travis CI - bump submodule'
git push https://"$DOCKER_PUSH_USER":"$DOCKER_PUSH_API_TOKEN"@github.com/"$DOCKER_PUSH_REPO".git master
fi
popd

View File

@ -1,8 +1,9 @@
{
"name": "@freecodecamp/database-seeding",
"name": "@freecodecamp/scripts-seed",
"private": true,
"version": "0.0.1",
"description": "A script to seed challenges in to the database",
"main": "seedChallenges.js",
"description": "Database seed scripts",
"main": "NA",
"scripts": {
"test": "jest"
},