-
-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: init create-webpack-app
package [1]
#4214
Open
snitin315
wants to merge
83
commits into
master
Choose a base branch
from
gsoc/create-webpack-app-package
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- init create-webpack-app package - installed deps - plop - minimist
added template files which containe handlebar templates and other common files
init .tsconfig
change the internal structure of template files
add build script add watch script
type: module is set in package.json
add ejs for rendering logic using ejs templates in future
for compatibility with plopfile, as it throws error if it's a commonjs file
- change templates to ejs templates - implement ejs rendering logic in plopfile.ts
- remove helper function - remove unnecessary comment
- better input validation - remove entrypoint prompt - fix path issues
- add both index.js and index.ts - fix bud in package.json template file
- fix the url - bumped the required node from 14 -> 18 - removed empty peerDeps and peerMetaDeps fields - fix cli entry point typo
- installs all the packages from deps array to the project directory
- single prompt to ask whether to skip - if yes then returns default answers object - if no then returns the interactive prompts interface
created commander cli implement init command with -s -f flags to skip and -f to override
- change prompt answer keystroke sequence
- remove prompt for router and add it as default - set CSS only as default option instead of none for cssType - fix routes and create new components - add new styles and only have global styles - add navBar as part of layout with buttons to traverse those routes
- add router as default and remove the prompt for routing - set the cssType to CSS only instead of none - make store as default - add new components to match the react like look and feel - add navbar to traverse those routes - change id of main div from #app to #root to resolve style conflicts
…move redundant tests - remove tests for vue and react for router and store/state since both of these are being checked in default tests - update snapshots
* refactor: modularize generators and actions - break plopfile generator and action logic in generators and actions - loading them asynchronously - modularity reduces redundancy and increases scalability * fix: remove false count line for bulk file creation * chore: install inquirer * feat: add react generator logic * docs: update Readme of templates as well as package * feat: add --template flag and reengineer conditional generator on given template - change defaultValues and generator function to be based on --template flag - add fallback prompt when template is invalid or unsupported * test: add test cases for --template flag and react generator * feat: change action file creation logger to show relative path instead of just file name * refactor: change default generator to a simpler and scalable logic - change default to resemble the design pattern of react generator - simple conditional flow for file creation and manipulation * perf: use newer @inquirer/prompts instead of inquirer - unpacked size decreased from ~60kb to 19kb * feat: add emoji support to console logs - for better ux added emojis according to type of log * refactor: move default.ts, and react.ts in init directory - introduce a directory structure of commandName/[template1, template2] - move default and react template generators in init/* - avoid namespace issues and cleaner structure * feat: add loader generator, default-template * feat: add plugin generator, default-template * refactor: resolve namespace issues for init command, its default values and generator imports * feat: add loader and plugin command and generators in cli * refactor: move test for init command and rename suite * feat: make test.utils to be configurable by introducing a factory function - the factory function returns a variant of utils configured with the path passed as argument * test: add loader and plugin test suites * fix: fixes the case of failure on single dependency * refactor: remove obsolete comments * refactor: change default values to reduce redundancy * feat: add vue template generator logic * feat: add template files for vue template * feat: add vue template flag command in cli * test: add test cases for vue template generation * chore: add vuex to cspell word array * fix: missing workboxWebpackPlugin dependency logic * feat: add pnpm as package manager in default, react generator * feat: replace vuex with pinia for state management - change all instance of vuex usage with pinia * chore: remove @vue/eslint-config-typescript - It was causing unusually long installation time using npm - Initial setup doesn't need this * feat: add rawExpression helper in vue generator - this is to escape the {{syntax}} of hbs which was a cause of conflict * feat: use composition api, and implement basic project structure * chore: remove cspell ignore directives and include "plopfile" in dictionary * feat: add svelte generator * feat: add svelte to cli frontend * feat: add svelte template files * test: add test cases for svelte generator in init suite * fix: fix webpack.config.js.tpl of vue, svelte, react templates * feat: add router and state support to react generator * feat: add template files to react generator improved ver - add router template files - add components - add states in those components - enhance tsconfig * feat: add router and state default answer to cli front end * test: add test cases for router and improve tests * Update packages/create-webpack-app/src/generators/init/svelte.ts * feat: change default of svelte store to true * refactor: rename dependencies array to devDependencies * refactor: rename dependencies array to devDependencies * fix: import as type error in store/index.ts in svelte template files - importing Writable as type resolves this error * feat: remove useSvelteStore prompt choice and set it included as default * refactor: rename dependencies array to devDependencies * refactor: lowercase all "Webpack" word instance * feat: add new fileAction based on ejs templates - add ejs support and remove hbs conflict - add fileCollision Logic in same - add abort prompt - add overwrite and overwrite all - add diff view in vs code - conditional rendering based on file type (bin or text) - Uses the same Config Object as plop libraries add function * feat: use new FileAction in all generators * feat: modify onSuccessHook and returned string to be more descriptive and configurable - change the string format to be "type:path" - type: [create, overwrite, skip, identical] - path: path/to/file - change the onSuccessHook to display appropriate information based on type * revert: remove hbs helper and its instances - reverts commit: #16de424e * refactor: remove indirect imports from "types.ts" and import from library - remove indirect imports - use unused types * Revert "Merge branch 'gsoc/create-webpack-app-package' into feat/file-generation-and-collision-handler" This reverts commit d64a678, reversing changes made to 367ec7a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI needs to pass before we can review this properly
…date" This reverts commit 838a6fa.
- failure was due to the bypassPrompt of runPrompts from node-plop - so removed bypassPrompt and added manual bypassing in index.ts - also removed prompts for projectPath as presumably they will always be supplied as cli arg
- change delimeter from `:` to `|` in fileActions - normalized paths to ensure compatible stdout
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
feature
Did you add tests for your changes?
yes
If relevant, did you update the documentation?
No
Summary
Add a new
create-webpack-app
package.Does this PR introduce a breaking change?
No
Other information
No