File tree Expand file tree Collapse file tree 8 files changed +50
-6
lines changed
cookie/{{cookiecutter.project_slug}} Expand file tree Collapse file tree 8 files changed +50
-6
lines changed Original file line number Diff line number Diff line change 1+ default_context :
2+ project_name : " demo"
3+ project_slug : " demo"
4+ project_generated_name : " demo"
5+ 6+ custom_domain : " demo.botics.co"
7+ repo_url : " https://github.com/crowdbotics/modules"
8+ heroku_dyno_size : " free"
9+ heroku_team : " "
10+ is_mobile : " y"
Original file line number Diff line number Diff line change 11{
22 "scaffold" : {
33 "type" : " react-native" ,
4- "version" : " 2.7.0 " ,
4+ "version" : " 2.7.1 " ,
55 "cookiecutter_context" : {
66 "project_name" : " {{cookiecutter.project_name}}" ,
77 "project_slug" : " {{cookiecutter.project_slug}}" ,
Original file line number Diff line number Diff line change 1- FROM crowdbotics/cb-django:3.8 -slim-buster AS build
1+ FROM crowdbotics/cb-django:3.9 -slim-buster AS build
22
33# Copy dependency management files and install app packages to /.venv
44COPY backend/Pipfile backend/Pipfile.lock /
@@ -11,7 +11,7 @@ COPY . .
1111RUN yarn install && yarn run web:build
1212
1313
14- FROM crowdbotics/cb-django:3.8 -slim-buster AS release
14+ FROM crowdbotics/cb-django:3.9 -slim-buster AS release
1515ARG SECRET_KEY
1616
1717# Set Working directory
Original file line number Diff line number Diff line change 99 "scripts" : {
1010 "semver" : " node scripts/semver.js" ,
1111 "cookie" : " node scripts/cookie.js" ,
12+ "demo" : " node scripts/demo.js" ,
1213 "raw" : " node scripts/raw.js" ,
1314 "template" : " node scripts/template.js" ,
1415 "bootstrap" : " npm run raw; npm run cookie" ,
Original file line number Diff line number Diff line change 11{
22 "scaffold" : {
33 "type" : " react-native" ,
4- "version" : " 2.7.0 " ,
4+ "version" : " 2.7.1 " ,
55 "cookiecutter_context" : {
66 "project_name" : " {{cookiecutter.project_name}}" ,
77 "project_slug" : " {{cookiecutter.project_slug}}" ,
Original file line number Diff line number Diff line change 1- FROM crowdbotics/cb-django:3.8 -slim-buster AS build
1+ FROM crowdbotics/cb-django:3.9 -slim-buster AS build
22
33# Copy dependency management files and install app packages to /.venv
44COPY backend/Pipfile backend/Pipfile.lock /
@@ -11,7 +11,7 @@ COPY . .
1111RUN yarn install && yarn run web:build
1212
1313
14- FROM crowdbotics/cb-django:3.8 -slim-buster AS release
14+ FROM crowdbotics/cb-django:3.9 -slim-buster AS release
1515ARG SECRET_KEY
1616
1717# Set Working directory
Original file line number Diff line number Diff line change 1+ import path from "path" ;
2+ import { execSync } from "child_process" ;
3+ import fs from "fs" ;
4+
5+ const demoPath = path . join ( process . cwd ( ) , "demo" ) ;
6+
7+ const options = {
8+ encoding : "utf8" ,
9+ stdio : "inherit" ,
10+ cwd : path . dirname ( demoPath )
11+ } ;
12+ const yaml = path . join ( process . cwd ( ) , "cookiecutter.yaml" ) ;
13+
14+ function removeDir ( dir ) {
15+ if ( fs . existsSync ( dir ) ) {
16+ fs . rmSync ( dir , { recursive : true } ) ;
17+ }
18+ }
19+
20+ removeDir ( demoPath ) ;
21+
22+ const rnCookieCutterCommand = [
23+ "pipenv run cookiecutter" ,
24+ "./dist/cookie" ,
25+ `--config-file ${ yaml } ` ,
26+ "--no-input"
27+ ] . join ( " " ) ;
28+
29+ execSync ( rnCookieCutterCommand , options ) ;
30+
31+ execSync ( `cd ${ demoPath } && zip -r ../dist/react-native-demo.zip .` , options ) ;
32+
33+ removeDir ( demoPath ) ;
You can’t perform that action at this time.
0 commit comments