update tsconfig
This commit is contained in:
parent
7449d5e316
commit
3138ec130d
@ -12,12 +12,22 @@
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartscaf",
|
||||
"description": "scaffold projects quickly",
|
||||
"description": "A project aimed at quickly scaffolding projects with support for TypeScript, smart file handling, and template rendering.",
|
||||
"npmPackagename": "@push.rocks/smartscaf",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"typescript",
|
||||
"scaffolding",
|
||||
"template rendering",
|
||||
"file handling",
|
||||
"project setup",
|
||||
"smart interaction",
|
||||
"yaml",
|
||||
"cli tool"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tsdocs": {
|
||||
"tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
}
|
||||
}
|
15
package.json
15
package.json
@ -2,7 +2,7 @@
|
||||
"name": "@push.rocks/smartscaf",
|
||||
"version": "4.0.15",
|
||||
"private": false,
|
||||
"description": "scaffold projects quickly",
|
||||
"description": "A project aimed at quickly scaffolding projects with support for TypeScript, smart file handling, and template rendering.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"scripts": {
|
||||
@ -21,9 +21,14 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/smartscaf#README",
|
||||
"keywords": [
|
||||
"scaffold",
|
||||
"polymer",
|
||||
"npm"
|
||||
"typescript",
|
||||
"scaffolding",
|
||||
"template rendering",
|
||||
"file handling",
|
||||
"project setup",
|
||||
"smart interaction",
|
||||
"yaml",
|
||||
"cli tool"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.66",
|
||||
@ -59,4 +64,4 @@
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
}
|
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
||||
|
113
readme.md
113
readme.md
@ -1,44 +1,97 @@
|
||||
# @push.rocks/smartscaf
|
||||
scaffold projects quickly
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@push.rocks/smartscaf)
|
||||
* [gitlab.com (source)](https://gitlab.com/push.rocks/smartscaf)
|
||||
* [github.com (source mirror)](https://github.com/push.rocks/smartscaf)
|
||||
* [docs (typedoc)](https://push.rocks.gitlab.io/smartscaf/)
|
||||
## Install
|
||||
To install `@push.rocks/smartscaf`, run the following command in your project directory:
|
||||
|
||||
## Status for master
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [![pipeline status](https://gitlab.com/push.rocks/smartscaf/badges/master/pipeline.svg)](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/push.rocks/smartscaf/badges/master/coverage.svg)](https://lossless.cloud)
|
||||
npm | [![npm downloads per month](https://badgen.net/npm/dy/@push.rocks/smartscaf)](https://lossless.cloud)
|
||||
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/push.rocks/smartscaf)](https://lossless.cloud)
|
||||
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
|
||||
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@push.rocks/smartscaf)](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@push.rocks/smartscaf)](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@push.rocks/smartscaf)](https://lossless.cloud)
|
||||
```bash
|
||||
npm install @push.rocks/smartscaf --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
Smartscaf provides a streamlined approach to quickly scaffold projects with predefined templates. It leverages modern TypeScript and ESM syntax to offer a flexible and powerful toolchain for project initialization. This guide will walk you through utilizing Smartscaf to its full potential, including setting up templates, customizing scaffolding processes, and programmatically controlling scaffolding operations.
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
### Setting Up Your First Template
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
A Smartscaf template is essentially a directory with a set of files that you want to reuse across projects. It can include source code files, configuration files, and a special `.smartscaf.yml` file for defining template variables and dependencies.
|
||||
|
||||
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://)
|
||||
1. **Create a Template Directory**: This directory should contain all the files and folders representing your template.
|
||||
|
||||
## Contribution
|
||||
2. **Define Template Variables in `.smartscaf.yml`**: This YAML file contains metadata about your template, such as default values for variables, dependency templates to merge, and scripts to run after scaffolding. Here's a basic example:
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
```yml
|
||||
defaults:
|
||||
projectName: "My Awesome Project"
|
||||
dependencies:
|
||||
merge: []
|
||||
runafter:
|
||||
- "npm install"
|
||||
```
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
3. **Utilize Handlebars Syntax for Dynamic Content**: Files in your template can use the Handlebars syntax (`{{variableName}}`) for dynamic content that will be replaced during the scaffolding process.
|
||||
|
||||
## Legal
|
||||
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
### Scaffolding a New Project
|
||||
|
||||
Once you have a template ready, you can scaffold a new project by programmatically creating and manipulating a `ScafTemplate` instance from Smartscaf.
|
||||
|
||||
1. **Import Smartscaf and Create a New Instance**:
|
||||
|
||||
```typescript
|
||||
import { ScafTemplate } from '@push.rocks/smartscaf';
|
||||
|
||||
async function scaffoldProject() {
|
||||
const myTemplate = await ScafTemplate.createTemplateFromDir('<path-to-your-template>');
|
||||
await myTemplate.readTemplateFromDir(); // Load the template
|
||||
// Supply any additional variables or override defaults
|
||||
await myTemplate.supplyVariables({
|
||||
projectName: 'My New Project'
|
||||
});
|
||||
// Optionally, interactively ask for missing variables
|
||||
// await myTemplate.askCliForMissingVariables();
|
||||
await myTemplate.writeToDisk('<destination-path>'); // Scaffold!
|
||||
}
|
||||
|
||||
scaffoldProject().then(() => console.log('Project scaffolded successfully!'));
|
||||
```
|
||||
|
||||
2. **Customizing the Scaffolding Process**: You can customize the scaffolding process by defining additional logic to manipulate files, directories, or template variables before writing to disk.
|
||||
|
||||
### Advanced Features
|
||||
|
||||
- **Merging Templates**: Smartscaf allows you to compose complex templates by specifying dependencies in the `.smartscaf.yml` file. This enables you to merge multiple templates into one scaffolded project.
|
||||
|
||||
- **Running Scripts After Scaffolding**: Specify an array of shell commands in the `runafter` section of your `.smartscaf.yml` to be executed after the project is scaffolded. This is useful for running installations or initial builds.
|
||||
|
||||
- **Programmatic API**: Smartscaf's flexible API allows for programmatically controlling every aspect of the scaffolding process, making it suitable for integrating into build tools, command line utilities, or CI/CD pipelines.
|
||||
|
||||
### Complete Feature Set and Use Cases
|
||||
|
||||
The usage scenarios outlined above merely scratch the surface of what Smartscaf can do. With its comprehensive API, you can manage complex scaffolding tasks, including but not limited to:
|
||||
|
||||
- Creating project templates with varying levels of complexity and customization.
|
||||
- Dynamically adjusting project structures based on user input or external parameters.
|
||||
- Integrating scaffolding steps into larger automation workflows, significantly reducing manual setup time for new projects.
|
||||
|
||||
In conclusion, Smartscaf empowers developers to streamline their project initialization process, ensuring consistency, reducing boilerplate, and allowing more time to be spent on development rather than setup. Its flexibility and broad feature set make it a valuable tool in a modern developer's toolkit.
|
||||
|
||||
For further information and a deeper dive into Smartscaf's capabilities, please refer to the [official documentation](https://gitlab.com/push.rocks/smartscaf#README) and explore the [source code](https://gitlab.com/push.rocks/smartscaf) for advanced use cases and customization options.
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
|
||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||
|
||||
### Trademarks
|
||||
|
||||
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
|
||||
|
||||
### Company Information
|
||||
|
||||
Task Venture Capital GmbH
|
||||
Registered at District court Bremen HRB 35230 HB, Germany
|
||||
|
||||
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||
|
Loading…
Reference in New Issue
Block a user