Skip to content
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
wants to merge 83 commits into
base: master
Choose a base branch
from

Commits on May 13, 2024

  1. feat: init new package and installed deps

    - init create-webpack-app package
    - installed deps
     - plop
     - minimist
    maverox committed May 13, 2024
    Configuration menu
    Copy the full SHA
    f910fe3 View commit details
    Browse the repository at this point in the history
  2. feat: add template directory from prototype

    added template files which containe handlebar templates and other common
    files
    maverox committed May 13, 2024
    Configuration menu
    Copy the full SHA
    c175c9d View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. build: typescript init

    init .tsconfig
    maverox committed May 15, 2024
    Configuration menu
    Copy the full SHA
    12fbc20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    92c2f19 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. feat: change template to align more with generators package

    change the internal structure of template files
    maverox committed May 16, 2024
    Configuration menu
    Copy the full SHA
    488f3df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a17fa63 View commit details
    Browse the repository at this point in the history
  3. chore: add scripts in package.json

    add build script
    add watch script
    maverox committed May 16, 2024
    Configuration menu
    Copy the full SHA
    bb6ca9f View commit details
    Browse the repository at this point in the history
  4. build: change module type to esm in package.json

    type: module is set in package.json
    maverox committed May 16, 2024
    Configuration menu
    Copy the full SHA
    d5e9fc3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    667d50d View commit details
    Browse the repository at this point in the history

Commits on May 18, 2024

  1. chore: add ejs and @types/ejs as dependencies

    add ejs for rendering logic using ejs templates in future
    maverox committed May 18, 2024
    Configuration menu
    Copy the full SHA
    8f89b98 View commit details
    Browse the repository at this point in the history
  2. build: change emit module of tsc to esnext

    for compatibility with plopfile, as it throws error if it's a commonjs
    file
    maverox committed May 18, 2024
    Configuration menu
    Copy the full SHA
    d2ca7f6 View commit details
    Browse the repository at this point in the history
  3. feat: add ejs template rendering support

    - change templates to ejs templates
    - implement ejs rendering logic in plopfile.ts
    maverox committed May 18, 2024
    Configuration menu
    Copy the full SHA
    acf5fa5 View commit details
    Browse the repository at this point in the history
  4. feat: add entryPoint prompt

    maverox committed May 18, 2024
    Configuration menu
    Copy the full SHA
    df39698 View commit details
    Browse the repository at this point in the history
  5. chore: remove unused code

    - remove helper function
    - remove unnecessary comment
    maverox committed May 18, 2024
    Configuration menu
    Copy the full SHA
    93c2142 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2024

  1. Configuration menu
    Copy the full SHA
    85b06bc View commit details
    Browse the repository at this point in the history
  2. build: change plopfile.ts on reviews

    - better input validation
    - remove entrypoint prompt
    - fix path issues
    maverox committed May 19, 2024
    Configuration menu
    Copy the full SHA
    88acfd2 View commit details
    Browse the repository at this point in the history
  3. feat: change the templates

    - add both index.js and index.ts
    - fix bud in package.json template file
    maverox committed May 19, 2024
    Configuration menu
    Copy the full SHA
    55e13ec View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    897e00b View commit details
    Browse the repository at this point in the history
  5. chore: change package.json on reviews

    - fix the url
    - bumped the required node from 14 -> 18
    - removed empty peerDeps and peerMetaDeps fields
    - fix cli entry point typo
    maverox committed May 19, 2024
    Configuration menu
    Copy the full SHA
    f9cb74a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b6baa6a View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. Configuration menu
    Copy the full SHA
    d9a0856 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2024

  1. feat: add npmInstall custom package

    - installs all the packages from deps array to the project directory
    maverox committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    d8ec7e1 View commit details
    Browse the repository at this point in the history
  2. chore: remove redundant code

    maverox committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    4c59396 View commit details
    Browse the repository at this point in the history
  3. fix: typo in prompt

    maverox committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    04b5f90 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. feat: add skip prompt functionality

    - single prompt to ask whether to skip
    - if yes then returns default answers object
    - if no then returns the interactive prompts interface
    maverox committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    1bdf924 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2024

  1. Configuration menu
    Copy the full SHA
    5e6a70b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bb5e201 View commit details
    Browse the repository at this point in the history
  3. feat: create commander cli and implement skip feat

    created commander cli
    implement init command with
    -s -f flags to
    skip and -f to override
    maverox committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    9bf21bf View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2024

  1. Configuration menu
    Copy the full SHA
    a295914 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e6add83 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4ac8bf0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d1fb3e7 View commit details
    Browse the repository at this point in the history
  5. test: create test suite for create-webpack-app package

    - create test cases for all the functionalities
    - Default project
    - Project with a specified generation path
    - TypeScript project
    - ES6 project
    - Project with Sass
    - Project with Sass and PostCSS
    - Project with Mini-CSS-Extract-Plugin
    - Project with Sass, CSS, and PostCSSProject with Less
    - Project with Stylus
    - Project with Webpack Dev Server (WDS)
    - Project with HtmlWebpackPluginProject with WorkboxWebpackPlugin
    - Project with a writable current path
    - Project with Yarn package manager
    maverox committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    2928772 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2024

  1. Update packages/create-webpack-app/README.md

    fix grammar
    
    Co-authored-by: Nitin Kumar <snitin315@gmail.com>
    maverox and snitin315 authored Jun 15, 2024
    Configuration menu
    Copy the full SHA
    3f66230 View commit details
    Browse the repository at this point in the history
  2. Update packages/create-webpack-app/README.md

    Co-authored-by: Nitin Kumar <snitin315@gmail.com>
    maverox and snitin315 authored Jun 15, 2024
    Configuration menu
    Copy the full SHA
    769e095 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. refactor: migrate cli logic to ts from js

    - write whole command building and actions logic of commander in
    src/index.ts for future scalability and type safety
    - bin/cli.js now only contains importing this src/index.ts compiled
    lib/index.js file.
    maverox committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    cb309df View commit details
    Browse the repository at this point in the history
  2. feat: add conditional file generation based on dynamic action function

    - using dynamic action function to generate files based on choices
    - change template structure
    maverox committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    860e5c2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    de92604 View commit details
    Browse the repository at this point in the history
  4. feat: change dependency installation to be cross-compatible

    - using cross-spawn instead of normal spawn method
    maverox committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    b150fa8 View commit details
    Browse the repository at this point in the history
  5. refactor: remove unused var

    maverox committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f3315f4 View commit details
    Browse the repository at this point in the history
  6. feat: add types

    maverox committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    19f59ea View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    02f04cb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    284ab14 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Configuration menu
    Copy the full SHA
    b80f340 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    944bb33 View commit details
    Browse the repository at this point in the history
  3. feat: change stdio settings for pkgInstall action

    change stdio settings to incorporate each animations and spinners of the
    underlying child process
    maverox committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    b82f4be View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b4cca8f View commit details
    Browse the repository at this point in the history
  5. test: implement test according to package

    made necessary changes based on the differences from the original cli
    and its tests keeping original tests as base
    maverox committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    e3ef415 View commit details
    Browse the repository at this point in the history
  6. fix: changed template package.json to improve compatibility with syntax

    earlier testing util spawn function was throwing error because of this.
    maverox committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    0a42c64 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f0196bd View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. feat: remove projectName and use path only

    - remove projectName and the cumbersome projectPath/projectName
    resolution
    - adjust tests accordingly
    - change template/**/package.json.tpl accordingly
    - update readme accordingly
    maverox committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    8e9dfb6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ff53355 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2024

  1. Configuration menu
    Copy the full SHA
    22873e8 View commit details
    Browse the repository at this point in the history
  2. perf: change generator conditional flows and dependencies attached

    - change dependencies for each prompt according to init command
    reference
    - change default for --force flag to appropriate values in index.ts as
    well as plopfile.ts
    - change conditional file generation for javascript langType
    maverox committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    fdd61df View commit details
    Browse the repository at this point in the history
  3. refactor: remove redundant code from test.utils and extend from utils…

    …/test-utils.js
    
    - earlier this file was an exact copy with a line changed
    - now it imports all the utility function and only extends run**()
    functions with path value pointing to create-webpack-cli
    maverox committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    ea92e56 View commit details
    Browse the repository at this point in the history
  4. test: update snapshots and test according to previous two commits

    - change snapshots according to new dependencies and defaults
    - change the import in create-webpack-app.test.js
    maverox committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    3fb7b98 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2024

  1. feat: loader and plugin commands, more templates (#4225)

    Co-authored-by: Anshuman Verma <anshu.av97@gmail.com>
    maverox and anshumanv authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    2c5bfb3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a6e4b61 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    06fe8cf View commit details
    Browse the repository at this point in the history
  4. test: change vue tests according to change in default value of "cssType"

    - change prompt answer keystroke sequence
    maverox committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    add60da View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e1664ff View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Configuration menu
    Copy the full SHA
    72c6efd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dd7dff1 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2024

  1. feat: improve react generator and template

    - 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
    maverox committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    804638c View commit details
    Browse the repository at this point in the history
  2. feat: improve vue generator and templates

    - 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
    maverox committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    830239f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f6fffa8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    572f42a View commit details
    Browse the repository at this point in the history
  5. test: modify test according to changes in previous commit and also re…

    …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
    maverox committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    67682a1 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Feat: File generation and collision handler [6] (#4249)

    * 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.
    maverox authored Sep 11, 2024
    Configuration menu
    Copy the full SHA
    403d12e View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Configuration menu
    Copy the full SHA
    20073b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    390325e View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Configuration menu
    Copy the full SHA
    acd575a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    838a6fa View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Revert "fix: fix issue with plop.js prompt failure due to inquirer up…

    …date"
    
    This reverts commit 838a6fa.
    maverox committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    5ba3f4f View commit details
    Browse the repository at this point in the history
  2. fix: failing prompts after update to inquirer v9.3.6

    - 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
    maverox committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    6697fa0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b79e528 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2024

  1. Configuration menu
    Copy the full SHA
    e33e4cb View commit details
    Browse the repository at this point in the history
  2. ci: fix failing CI on windows due to unnormalized paths in logs

    - change delimeter from `:` to `|` in fileActions
    - normalized paths to ensure compatible stdout
    maverox committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    1cfccdd View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. chore: fix lint

    snitin315 committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    28c6a83 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6092fb1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e714995 View commit details
    Browse the repository at this point in the history
  4. chore: fix tests

    snitin315 committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    cd8ab15 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Configuration menu
    Copy the full SHA
    01cb7a4 View commit details
    Browse the repository at this point in the history