@mikeyb_the_coder/mvc-init-package
v1.1.5
Published
Initialises a complete boilerplate for an MVC project, including ts-config and webpack
Readme
This package will provision a complete MVC boilerplate, initialise npm and add dependencies for ts-config and webpack amongst others. Instructions: In a terminal, cd to a blank directory (in virtual studio code simply open a new blank folder, and start a new terminal) Type 'npm install -g @mikeyb_the_coder/mvc-init-package' -- This will install a command 'mvc-init' globally, and only needs doing once
Type 'mvc-init' in a new blank folder -- This will provision all the files in the current folder
Type 'npm start' to launch a new tab in your browser which will auto update when you edit any file in the src folder Type 'npm run build' when ready to build all your files into the 'dist' folder. This will create 2 files: index.html and bundle.js, which can be uploaded to a server Here is an explanation of all the files created:
.
├── dist (this will contain index.html and bundle.js when you type npm run build)
├── node_modules
├── package-lock.json
├── package.json
├── src
│ ├── assets.d.ts (enables importing of png files)
│ ├── html.d.ts (enables importing of html files)
│ ├── index.html (the initial html file)
│ ├── index.ts (entry point for typescript - imports controller.ts and styles.css)
│ ├── modules
│ │ ├── controller.ts (imports model.ts and view.ts)
│ │ ├── assets (put images here)
│ │ ├── html
│ │ │ └── init.html (a template to append to the body tag)
│ │ ├── model.ts
│ │ └── view.ts
│ └── styles.css (css file which will be bundled into final bundle.js)
├── tsconfig.json
└── webpack.config.ts