Last active
October 26, 2021 04:56
-
-
Save mikeananev/42b9d4b4ed48dd9283e37c5a6ce5b145 to your computer and use it in GitHub Desktop.
New HTML/CSS project
This file contains hidden or 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
| import './index.css' | |
| import moment from 'moment' | |
| console.log("Hello from JavaScript!"); | |
| console.log(moment().startOf('day').fromNow()); |
This file contains hidden or 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
| New HTML/CSS project | |
| 0. mkdir `myweb01` folder, then `cd myweb01` | |
| 1. npm install -g vite; npm install -g vite-cli | |
| 2. npm init vite-app | |
| 3. Delete vue files | |
| 4. In package.json check: | |
| "scripts": { | |
| "dev": "vite", | |
| "build": "vite build" | |
| }, | |
| 5. Place new html files in `public/` folder (it is root), despite index.html in the project root. | |
| 6. https://dev.to/alvarosaburido/getting-started-with-vite-2-1f4p | |
| 7. add js libraries to `main.js`. example (see below): npm install moment | |
| 8. `npm run dev` - for dev mode & hot reload | |
| 9. `npm run build` - for production build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment