americanexpress / create-using-template Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
create-using-template supports creating dynamic files but not dynamic folders.
We are using create-using-template generator to develop a template module to help some of legacy applications to OneApp V5. Since its international markets, each market team will use different locale(en-US, en-AU, ja-JP etc).
This locale information will be obtained from user via prompts and need to generate dynamic folder named as this value. This is required as per OneApp module structure in this one-app documentation
module
βββ README.md
βββ locale
| βββ en-US
| | βββ links
| | | βββ production.json
| | | βββ qa.json
| | | βββ integration.json
| | βββ copy.json
| βββ es-mx
| βββ links
| | βββ production.json
| | βββ qa.json
| | βββ integration.json
| βββ copy.json
βββ package.json
βββ src
βββ index.js
We would like create-using-template to support dynamic folder creation similar to dynamic file creation.
The teams who may use our template module can rename the locale folder as per their need after the module generation is completed manually. But really not an ideal solution.
main
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iβm sure you can fix this πͺ.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donβt help, or if this issue is reporting something you think isnβt right, you can always ask the humans behind semantic-release.
An npm token must be created and set in the NPM_TOKEN
environment variable on your CI environment.
Please make sure to create an npm token and to set it in the NPM_TOKEN
environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/
.
Good luck with your project β¨
Your semantic-release bot π¦π
When running a local template for testing purposes, the path to the template only works if it is relative to the current directory. Absolute paths give an error.
npm pack
in a template directory to create a tgz file.npm init using-template /Users/me/workspace/some-template/some-template-1.0.0.tgz
Failed to create module: Invalid or unexpected token
/Users/me/workspace/some-template/some-template-1.0.0.tgz:1
οΏ½
^
SyntaxError: Invalid or unexpected token
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
OTOH, if you pass a relative path to tgz from the current directory, it works as expected.
npm init using-template ../some-template/some-template-1.0.0.tgz`
There should be no difference between absolute and relative paths.
The npm install
that is done in Step 5 uses the --prefer-offline
flag to npm. While this is fast, it means your newly created project will have the same dependency versions as the last time you ran the generator, including any security issues. Best practice is to always use the current versions of packages when creating a new project. Otherwise you may start out with security vulnerabilities.
Create a project using the template. The npm command will be run with --prefer-offline
at the end.
Either remove the flag or provide an option to not use it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.