CN110045950A - Static page based on nodejs develops scaffold method - Google Patents
Static page based on nodejs develops scaffold method Download PDFInfo
- Publication number
- CN110045950A CN110045950A CN201910141218.1A CN201910141218A CN110045950A CN 110045950 A CN110045950 A CN 110045950A CN 201910141218 A CN201910141218 A CN 201910141218A CN 110045950 A CN110045950 A CN 110045950A
- Authority
- CN
- China
- Prior art keywords
- file
- nodejs
- output directory
- css
- gulp
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
A kind of static page exploitation scaffold method based on nodejs, the following steps are included: (I) development process, nodejs is first installed, gulp and express, again with the variation of gulp building Mission Monitor all static resources, js, sass and html, it is compiled task automatically, express is then used to start web services as web server, the routing for configuring front end exploitation server, builds the page using arttemplate template;(II) it is packaged process, front end is completed with gulp building task and is packaged.The present invention can write the code of complicated pattern with sass grammer, and it is compiled into the css of browser identification automatically, performance is improved to multiple css or js compression, uses template development, modularization management html file, addition cryptographic Hash are used to update the version of js file and css file.
Description
Technical field
The present invention relates to the technical fields of page development method, in particular to the static page based on nodejs develops foot hand
Frame method.
Background technique
The development of present front-end technology allows front end exploitation to be not limited solely to the exploitation of static Web page, front-end code logic
Also day urges complexity, it has not been convenient to manage, if it is big to will lead to development amount according to pervious exploitation, optimization trouble, publication is difficult
The problems such as.The publication of Nodejs is that server front end can introduce automation building to be developed, and solution development amount is big,
The problem of optimization trouble and publication difficulty.
Summary of the invention
The present invention is proposed to overcome disadvantage existing in the prior art, and the purpose is to provide based on nodejs's
Static page develops scaffold method.
The technical scheme is that
A kind of static page exploitation scaffold method based on nodejs, comprising the following steps:
(I) development process
Nodejs, gulp and express are first installed, then construct all static resources of Mission Monitor, js, sass and html with gulp
Variation, be compiled task automatically, then use express as web server start web services, configuration front end exploitation clothes
The routing of business device, builds the page using arttemplate template;
(II) it is packaged process
Front end is completed with gulp building task to be packaged.
With all static resources of gulp building Mission Monitor, js, css, sass and html in step (I) development process
The specific steps of variation are as follows:
(I) monitors all static resources, is automatically generated in output directory;
(II) monitors all js files, compresses and is generated in output directory automatically;
(III) monitors all sass files, compresses and is converted into the css file of browser identification automatically and be generated to output directory
In;
(IV) monitors all html files, automatically generates in output directory.
The step (II) is packaged the specific steps of process are as follows:
(I) removes the All Files under output directory path;
(II) deletes the httl file in output directory path, generates html file, and carry out compression processing;
(III) compresses css file, and by the css file generated of compression into output directory;
(IV) compresses js file, and by the js file generated of compression into output directory;
(V) injects the configuration path of project, including server path, resource path and template path;
Html file in output directory is converted to httl file by (VI);
(VII) deletes the js file and css file generated in packing process.
The beneficial effects of the present invention are:
The present invention can write the code of complicated pattern with sass grammer, and be compiled into the css of browser identification automatically, right
Multiple css or js compression improves performance, and using template development, modularization management html file, addition cryptographic Hash is for updating
The version of js file and css file.
Detailed description of the invention
Fig. 1 is flow chart of the method for the present invention.
Specific embodiment
With reference to the accompanying drawings of the specification and embodiment is to the present invention is based on the static pages of nodejs to develop scaffold method
Be described in detail: wherein nodejs is the JavaScript script running environment based on Google's V8 engine;gulp
For automation the build tool based on stream;Express is that quick, open, the extremely simple website service based on Nodejs platform is opened
Send out frame;Js is the scripting language that a kind of browser can identify operation;Sass is a kind of stylesheet language for being different from css;css
For a kind of stylesheet language;Html is hypertext markup language;Arttemplate template is that a kind of high performance script template draws
It holds up;Httl is a kind of view template that server-side programming language uses.
As shown in Figure 1, a kind of static page based on nodejs develops scaffold method, comprising the following steps:
(I) development process
Nodejs, gulp and express are first installed, then construct all static resources of Mission Monitor, js, sass and html with gulp
Variation, be compiled task automatically, then use express as web server start web services, configuration front end exploitation clothes
The routing of business device, builds the page using arttemplate template;
(II) it is packaged process
Front end is completed with gulp building task to be packaged.
With all static resources of gulp building Mission Monitor, js, css, sass and html in step (I) development process
The specific steps of variation are as follows:
(I) monitors all static resources, is automatically generated in output directory;
(II) monitors all js files, compresses and is generated in output directory automatically;
(III) monitors all sass files, compresses and is converted into the css file of browser identification automatically and be generated to output directory
In;
(IV) monitors all html files, automatically generates in output directory.
The step (II) is packaged the specific steps of process are as follows:
(I) removes the All Files under output directory path;
(II) deletes the httl file in output directory path, generates html file, and carry out compression processing;
(III) compresses css file, and by the css file generated of compression into output directory;
(IV) compresses js file, and by the js file generated of compression into output directory;
(V) injects the configuration path of project, including server path, resource path and template path;
Html file in output directory is converted to httl file by (VI);
(VII) deletes the js file and css file generated in packing process.
The present invention can write the code of complicated pattern with sass grammer, and be compiled into browser identification automatically
Css improves performance to multiple css or js compression, and using template development, modularization management html file, addition cryptographic Hash is used
In the version for updating js file and css file.
Claims (3)
1. a kind of static page based on nodejs develops scaffold method, it is characterised in that: the following steps are included:
(I) development process
Nodejs, gulp and express are first installed, then construct all static resources of Mission Monitor, js, sass and html with gulp
Variation, be compiled task automatically, then use express as web server start web services, configuration front end exploitation clothes
The routing of business device, builds the page using arttemplate template;
(II) it is packaged process
Front end is completed with gulp building task to be packaged.
2. the static page according to claim 1 based on nodejs develops scaffold method, it is characterised in that: the step
Suddenly with all static resources of gulp building Mission Monitor, the specific steps of js, css, sass and html variation in (I) development process
Are as follows:
(I) monitors all static resources, is automatically generated in output directory;
(II) monitors all js files, compresses and is generated in output directory automatically;
(III) monitors all sass files, compresses and is converted into the css file of browser identification automatically and be generated to output directory
In;
(IV) monitors all html files, automatically generates in output directory.
3. the static page according to claim 1 based on nodejs develops scaffold method, it is characterised in that: the step
Suddenly (II) is packaged the specific steps of process are as follows:
(I) removes the All Files under output directory path;
(II) deletes the httl file in output directory path, generates html file, and carry out compression processing;
(III) compresses css file, and by the css file generated of compression into output directory;
(IV) compresses js file, and by the js file generated of compression into output directory;
(V) injects the configuration path of project, including server path, resource path and template path;
Html file in output directory is converted to httl file by (VI);
(VII) deletes the js file and css file generated in packing process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910141218.1A CN110045950A (en) | 2019-02-26 | 2019-02-26 | Static page based on nodejs develops scaffold method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910141218.1A CN110045950A (en) | 2019-02-26 | 2019-02-26 | Static page based on nodejs develops scaffold method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110045950A true CN110045950A (en) | 2019-07-23 |
Family
ID=67274273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910141218.1A Pending CN110045950A (en) | 2019-02-26 | 2019-02-26 | Static page based on nodejs develops scaffold method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110045950A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110659062A (en) * | 2019-09-20 | 2020-01-07 | 贝壳技术有限公司 | Front-end scaffold configuration method and device, readable storage medium and electronic equipment |
CN111290753A (en) * | 2020-01-20 | 2020-06-16 | 远光软件股份有限公司 | Method, device, equipment and storage medium for building front-end development environment |
CN113835740A (en) * | 2021-11-29 | 2021-12-24 | 山东捷瑞数字科技股份有限公司 | Search engine optimization-oriented automatic front-end code repairing method |
CN113946397A (en) * | 2021-10-18 | 2022-01-18 | 工银科技有限公司 | Display package packaging method, device, system and storage medium |
-
2019
- 2019-02-26 CN CN201910141218.1A patent/CN110045950A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110659062A (en) * | 2019-09-20 | 2020-01-07 | 贝壳技术有限公司 | Front-end scaffold configuration method and device, readable storage medium and electronic equipment |
CN110659062B (en) * | 2019-09-20 | 2023-09-29 | 贝壳技术有限公司 | Front-end scaffold configuration method and device, readable storage medium and electronic equipment |
CN111290753A (en) * | 2020-01-20 | 2020-06-16 | 远光软件股份有限公司 | Method, device, equipment and storage medium for building front-end development environment |
CN113946397A (en) * | 2021-10-18 | 2022-01-18 | 工银科技有限公司 | Display package packaging method, device, system and storage medium |
CN113835740A (en) * | 2021-11-29 | 2021-12-24 | 山东捷瑞数字科技股份有限公司 | Search engine optimization-oriented automatic front-end code repairing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110045950A (en) | Static page based on nodejs develops scaffold method | |
CN101127655B (en) | Method and system for integrating existing www systems | |
CN102184184B (en) | Method for acquiring webpage dynamic information | |
CN103389895B (en) | A kind of generation method and system of front end page | |
WO2018126964A1 (en) | Task execution method and apparatus and server | |
CN105243159A (en) | Visual script editor-based distributed web crawler system | |
US11677809B2 (en) | Methods for transforming a server side template into a client side template and devices thereof | |
CN106021257A (en) | Method, device, and system for crawler to capture data supporting online programming | |
US8819539B1 (en) | On-the-fly rewriting of uniform resource locators in a web-page | |
CN113420201B (en) | Cross-domain element positioning and tree generating method for browser RPA system | |
CN101382893B (en) | On-line assembling method for component based on Web service | |
CN109144567B (en) | Cross-platform webpage rendering method and device, server and storage medium | |
CN106649567A (en) | Web crawler system based on browser kernel | |
CN101562618A (en) | Method and device for detecting web Trojan | |
CN101763432A (en) | Method for constructing lightweight webpage dynamic view | |
CN110598135A (en) | Network request processing method and device, computer readable medium and electronic equipment | |
KR20120122959A (en) | Method and Device for Collecting Web Contents and Computer-readable Recording Medium for the same | |
CN104166545A (en) | Webpage resource sniffing method and device | |
CN104331512A (en) | Automatic BBS (bulletin board system) page acquisition method | |
CN112287266A (en) | Processing method and device for webpage configuration, equipment and storage medium | |
CN116302895A (en) | User behavior collection method, device, equipment and medium based on Javascript | |
CN110851678A (en) | Method and device for crawling data | |
CN109117134A (en) | Express front-end automatic construction method based on nodejs | |
JP2013122655A (en) | Browser execution script conversion system and browser execution script conversion program | |
US11843679B2 (en) | Automated dependency management based on page components |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190723 |
|
WD01 | Invention patent application deemed withdrawn after publication |