Skip to content

Commit

Permalink
feat(createproject): yarn create/npm init starter kits for Diez (#…
Browse files Browse the repository at this point in the history
…130)

- Adds starter kit commands for bootstrapping Diez projects:
  - `yarn create diez`
  - `yarn create diez-project`
  - `yarn create diez-app`
  - `npm init diez`
  - `npm init diez-project`
  - `npm init diez-app`
  • Loading branch information
stristr committed Jun 11, 2019
1 parent 1aabb16 commit 86caab2
Show file tree
Hide file tree
Showing 33 changed files with 119 additions and 30 deletions.
7 changes: 7 additions & 0 deletions clis/create-diez-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `create-diez-app`

This package provides a starter kit command for bootstrapping a new [Diez](https://diez.org) project.

Usage:
- `yarn create diez-app <project-name>`
- `npm init diez-app <project-name>`
3 changes: 3 additions & 0 deletions clis/create-diez-app/bin/create-diez-app
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
process.argv.splice(2, 0, 'create');
require('diez');
19 changes: 19 additions & 0 deletions clis/create-diez-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "create-diez-app",
"version": "10.0.0-alpha.3",
"description": "A helper CLI for creating Diez projects.",
"author": "The Haiku Team <contact@haiku.ai>",
"license": "Proprietary",
"repository": {
"type": "git",
"url": "git+https://github.com/diez/diez.git"
},
"homepage": "https://diez.org",
"dependencies": {
"diez": "^10.0.0-alpha.3",
"@diez/createproject": "^10.0.0-alpha.3"
},
"bin": {
"create-diez-app": "./bin/create-diez-app"
}
}
7 changes: 7 additions & 0 deletions clis/create-diez-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `create-diez-project`

This package provides a starter kit command for bootstrapping a new [Diez](https://diez.org) project.

Usage:
- `yarn create diez-project <project-name>`
- `npm init diez-project <project-name>`
3 changes: 3 additions & 0 deletions clis/create-diez-project/bin/create-diez-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
process.argv.splice(2, 0, 'create');
require('diez');
19 changes: 19 additions & 0 deletions clis/create-diez-project/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "create-diez-project",
"version": "10.0.0-alpha.3",
"description": "A helper CLI for creating Diez projects.",
"author": "The Haiku Team <contact@haiku.ai>",
"license": "Proprietary",
"repository": {
"type": "git",
"url": "git+https://github.com/diez/diez.git"
},
"homepage": "https://diez.org",
"dependencies": {
"diez": "^10.0.0-alpha.3",
"@diez/createproject": "^10.0.0-alpha.3"
},
"bin": {
"create-diez-project": "./bin/create-diez-project"
}
}
7 changes: 7 additions & 0 deletions clis/create-diez/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `create-diez`

This package provides a starter kit command for bootstrapping a new [Diez](https://diez.org) project.

Usage:
- `yarn create diez <project-name>`
- `npm init diez <project-name>`
3 changes: 3 additions & 0 deletions clis/create-diez/bin/create-diez
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
process.argv.splice(2, 0, 'create');
require('diez');
19 changes: 19 additions & 0 deletions clis/create-diez/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "create-diez",
"version": "10.0.0-alpha.3",
"description": "A helper CLI for creating Diez projects.",
"author": "The Haiku Team <contact@haiku.ai>",
"license": "Proprietary",
"repository": {
"type": "git",
"url": "git+https://github.com/diez/diez.git"
},
"homepage": "https://diez.org",
"dependencies": {
"diez": "^10.0.0-alpha.3",
"@diez/createproject": "^10.0.0-alpha.3"
},
"bin": {
"create-diez": "./bin/create-diez"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions packages/cli/package.json → clis/diez/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "diez",
"main": "./bin/diez",
"version": "10.0.0-alpha.3",
"description": "The entry point for the Diez CLI.",
"author": "The Haiku Team <contact@haiku.ai>",
Expand Down
2 changes: 1 addition & 1 deletion examples/preview-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"istanbul-reporter-cobertura-haiku": "^1.0.4",
"node-sass": "^4.11.0",
"sass-loader": "^7.1.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"vue-loader": "15.0.0"
}
}
6 changes: 3 additions & 3 deletions examples/preview-site/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@
</template>

<script lang="ts">
import {Component, Vue} from 'nuxt-property-decorator';
import NavBar from '@/components/NavBar.vue';
import {Component, Vue} from 'nuxt-property-decorator';
@Component({
components: {NavBar}
components: {NavBar},
})
export default class extends Vue {
}
</script>

Expand Down
2 changes: 1 addition & 1 deletion examples/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"node-sass": "^4.11.0",
"sass-loader": "^7.1.0",
"ts-jest": "^24.0.2",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"vue-jest": "^3.0.4",
"vue-loader": "15.0.0"
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"workspaces": [
"packages/*",
"clis/*",
"examples/*",
"examples/*/web",
"examples/*/*/web",
Expand Down Expand Up @@ -32,7 +33,7 @@
"ts-morph": "^2.3.0",
"ts-node": "^8.1.0",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typedoc": "^0.14.2",
"typedoc-plugin-no-inherit": "^1.1.6",
"typescript": "^3.5.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@
"istanbul-reporter-cobertura-haiku": "^1.0.4",
"jest": "^24.7.1",
"jest-tap-reporter": "^1.9.0",
"package-json": "^6.3.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
},
"dependencies": {
Expand All @@ -41,6 +40,7 @@
"chalk": "^2.4.2",
"commander": "^2.19.0",
"fs-extra": "^7.0.1",
"package-json": "^6.3.0",
"server-destroy": "^1.0.1",
"stack-trace": "^0.0.10",
"typed-errors": "^1.1.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"no-case": "^2.3.2",
"time-fix-plugin": "^2.0.6",
"ts-morph": "^2.3.0",
"typescript": "^3.5.1",
"uuid": "^3.3.2",
"webpack": "^4.29.0",
"webpack-dev-middleware": "^3.6.1",
Expand All @@ -49,7 +50,6 @@
"just-curves": "^0.2.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"typescript": "^3.5.1"
"tslint-config-haiku": "^1.0.21"
}
}
2 changes: 1 addition & 1 deletion packages/compiler/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export class Program extends EventEmitter implements CompilerProgram {
// Create a stub type file for typing the Component class and number primitives.
const stubTypeFile = this.project.createSourceFile(
join('src', '__stub.ts'),
"import {Component, Integer, Float} from '@diez/engine';",
'import {Component, Integer, Float} from \'@diez/engine\';',
{overwrite: true},
);

Expand Down
2 changes: 1 addition & 1 deletion packages/createproject/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"ts-jest": "^24.0.2",
"ts-morph": "^2.3.0",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/createproject/src/commands/create.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export = async (_: {}, projectName: string) => {
type: 'input',
name: 'projectName',
required: true,
message: 'Enter the name for your Diez (DS). A directory will be created if it does not already exist.',
message: 'Enter the name for your Diez project. A directory will be created if it does not already exist.',
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/createproject/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const createProject = async (packageName: string, targets: string[], cwd
for (const target of (targets.length ? targets : ['web'])) {
info(`
${inlineCodeSnippet(`${useYarn ? 'yarn' : 'npm run'} build-${target}`)}
Runs ${inlineComment(`diez compile --target ${target}`)} for your Diez.`);
Runs ${inlineComment(`diez compile --target ${target}`)} for your Diez project.`);
}

info('\nCheck out https://beta.diez.org/getting-started to learn more.');
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"jest-tap-reporter": "^1.9.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
}
}
4 changes: 2 additions & 2 deletions packages/generation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
"dependencies": {
"@diez/cli-core": "^10.0.0-alpha.3",
"@diez/compiler": "^10.0.0-alpha.3",
"@diez/storage": "^10.0.0-alpha.3",
"color-string": "^1.5.3",
"fontkit": "^1.8.0",
"fs-extra": "^7.0.1",
"pascal-case": "^2.0.1",
"ts-morph": "^2.3.0"
},
"devDependencies": {
"@diez/storage": "^10.0.0-alpha.3",
"@diez/test-utils": "^10.0.0-alpha.3",
"@types/jest": "^24.0.11",
"istanbul-reporter-cobertura-haiku": "^1.0.4",
"jest": "^24.7.1",
"jest-tap-reporter": "^1.9.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/prefabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"jest-tap-reporter": "^1.9.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/sources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"stream-mock": "^1.2.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
}
}
8 changes: 4 additions & 4 deletions packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"jest-tap-reporter": "^1.9.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"typescript": "^3.5.1",
"uuid": "^3.3.2"
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
},
"dependencies": {
"fs-extra": "^7.0.1",
"handlebars": "^4.1.1",
"istextorbinary": "^2.5.1",
"klaw": "^3.0.0",
"node-fetch": "^2.5.0"
"node-fetch": "^2.5.0",
"uuid": "^3.3.2"
}
}
2 changes: 1 addition & 1 deletion packages/targets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"ts-jest": "^24.0.2",
"ts-node": "^8.1.0",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"jest-tap-reporter": "^1.9.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
}
}
2 changes: 1 addition & 1 deletion templates/package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"jest-tap-reporter": "^1.9.0",
"ts-jest": "^24.0.2",
"tslint": "^5.15.0",
"tslint-config-haiku": "^1.0.20",
"tslint-config-haiku": "^1.0.21",
"typescript": "^3.5.1"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15451,10 +15451,10 @@ tslint-config-airbnb@^5.10.0:
tslint-eslint-rules "^5.4.0"
tslint-microsoft-contrib "~5.2.1"

tslint-config-haiku@^1.0.20:
version "1.0.20"
resolved "https://registry.yarnpkg.com/tslint-config-haiku/-/tslint-config-haiku-1.0.20.tgz#a623705a23b28c80786022f0101fdd01f8950e38"
integrity sha512-y+490m97AmQbAh8yW+kxA1PozpLGFDFmC1oo4TDdvKM2O/xirAZfqyuiViiFsEV3Ag0PTmFmGXgAXtFk1FTRzQ==
tslint-config-haiku@^1.0.21:
version "1.0.21"
resolved "https://registry.yarnpkg.com/tslint-config-haiku/-/tslint-config-haiku-1.0.21.tgz#747a767a08e590b7ff9f16054d1083e0ec51cd9f"
integrity sha512-/kk+GtKou2QwzaBnPGP6iA7sAUkFNg9Lal26vW9Zsqm8DUVuFhkZIv2LjLF0ccFuCS83lt5P/oSHhVUDUOeyoQ==
dependencies:
tslib "^1.9.3"
tslint "^5.11.0"
Expand Down

0 comments on commit 86caab2

Please sign in to comment.