GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - DudkinON/webpack-angularjs: Webpack config for Angular JS 1.7

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
config
config
 
 
src
src
 
 
.babelrc
.babelrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
demo.png
demo.png
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
postcss.config.js
postcss.config.js
 
 

Repository files navigation

Webpack config for AngularJS

This repo is already configured for AngularJS framework. Supports preprocessor CSS languages: SASS, LESS, and STYLUS. Contains developer dev server that hard reloads, all necessary packages, and HTML preprocessors like EJS, PUG, and Handlebars.

Dependencies

  • GIT
  • Node JS
  • NPM (Node JS includes NPM)

Install

In your terminal type following commands:

git clone https://github.com/DudkinON/webpack-angularjs.git
cd webpack-angularjs

then you need install packages:

Install with NPM
npm install
Install with NPM
yarn install 

Run

Next, build the project with following command:

npm run build:dev

then, run server:

npm run server:dev

Production commands

For build production code type:

npm run build

then run http server:

npm run server:prod

server will run on http://127.0.0.1:3000

Node: by default server uses port 3000, make sure that this port is free

After server is running you will see:

demo

HTML preprocessors

This part discusses how to use HTML preprocessors

Open config/webpack.dev.config.js file and find:

  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new HTMLWebpackPlugin({
      template: "./src/html/index.html",
      title: "Webpack: AngularJS configuration"
    })
  ]
PUG preprocessor

change index.html to index.pug

EJS preprocessor

change index.html to index.ejs

Handlebars preprocessor

change index.html to index.hbs

Then you can open src/html/index.[ejs|hbs|pug] file and use your favorite preprocessor

CSS preprocessors

This part discusses how to use CSS preprocessors

Open src/js/main.js and find:

require("../styles/main.css");
LESS preprocessor

then change main.css to main.less

SASS preprocessor

then change main.css to main.sass

Stylus preprocessor

then change main.css to main.styl

Open file src/styles/main.[less|sass|styl] and work with your favorite CSS preprocessor

Angular.js entry point

Angular JS application files located in src/js/app. The main.js is the entry point for AngularJS app.

License

This repo sharing under MIT license

About

Webpack config for Angular JS 1.7

Topics

angularjsejshbslesspugsassstyluswebpack4

Resources

Readme
MIT license
Activity

Stars

11 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.