Code Monkey home page Code Monkey logo

gulp-web's Introduction

用gulp搭建的web开发小框架,适用简单web官网项目, 利于SEO

安装依赖

推荐使用yarn安装
yarn install  /npm install

配置

相应的文件和目录需要和gulp配置里面一样,不一致需要自己修改,如下图
├─.babelrc
├─.gitignore
├─gulpfile.babel.js
├─package.json
├─README.md
├─yarn.lock
├─src
|  ├─styles
|  |   ├─index.scss
|  |   ├─product.scss
|  |   ├─common
|  |   |   ├─_base.scss
|  |   |   ├─_mixins.scss
|  |   |   └_variable.scss
|  ├─static
|  |   ├─images
|  |   |   ├─bg_1.jpg
|  |   |   ├─icon
|  |   |   |  └icon_top.png
|  ├─scripts
|  |    ├─index.js
|  |    ├─product.js
|  |    ├─modules
|  |    |    ├─plugin
|  |    |    |   ├─jquery-3.6.1.min.js
|  |    |    |   ├─jquery-tab.js
|  |    |    |   └jquery-to-top.js
|  |    |    ├─common
|  |    |    |   └index.js
|  ├─pages
|  |   ├─index.html
|  |   └product.html
|  ├─include
|  |    ├─footer.html
|  |    └nav.html
├─dist
|  ├─20221111.zip
|  ├─styles
|  |   ├─index copy.css
|  |   ├─index.css
|  |   └product.css
|  ├─static
|  |   ├─images
|  |   |   ├─bg_1 copy.jpg
|  |   |   ├─bg_1.jpg
|  |   |   ├─icon
|  |   |   |  ├─icon_top copy 2.png
|  |   |   |  ├─icon_top copy.png
|  |   |   |  └icon_top.png
|  ├─scripts
|  |    ├─case.js
|  |    ├─index.js
|  |    └product.js
|  ├─pages
|  |   ├─index copy.html
|  |   ├─index.html
|  |   └product.html

执行命令

yarn serve / npm run serve  运行开发环境
yarn build:dev 编译打包文件,dev开发环境会生成源码映射,方面调试,开发完之后需要运行yarn build 重新编译,去掉生成的sourcemaps注释
yarn build 生产环境打包,编译文件,不会生成 sourcemaps源码文件 (生产环境需要运行此命令) 

gulp-web's People

Contributors

hjonping avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.