Node.JS—npm related

Article directory Preface 1. package.json Configuration items version: 1.0.0 devDependencies dependencies peerDependencies optionalDependencies 2. npm command 1. npm config list xmzs use 2. npm install package-lock.json function 3. npm run 4. View globally installed executable files npm lifecycle npx Introduction to npx npx search command process Advantages The difference between npx and npx npx usage […]

npm Babel es6 webpack

1. Introduction 1. What is NPM NPM, the full name of Node Package Manager, is a Node.js package management tool. It is the world’s largest module ecosystem. All modules in it are open source and free. It is also a Node.js package management tool, equivalent to Maven on the front end. 2. Installation location of […]

Behind npm init @vitejs/app is just the tip of the npm CLI iceberg

Click the blue word “Front-end Sinan” above to follow me Your attention means a lot Original@frontendsinan The final words are at the front. I sometimes come to the conclusion: It turns out that those commands or tools that I don’t commonly use exist to solve the problems encountered by the big guys! We deal with […]

Use vue3 to build vue component library from scratch vue3 +pnpm +workspace+ vitepress + vite automated deployment github

online connection Online component address dc-pro-component 1. Project construction, create project dc-pro-component pnpm init pnpm install @vitejs/plugin-vue vite -D pnpm-workspace.yaml soft link packages: – “packages/**” – “examples” 2. Create folders and component tests written by examples pnpm init Create the src folder and create the corresponding file config file content import {<!– –> defineConfig } […]

How to use front-end package managers (such as npm, Yarn)?

Gathering sand into a tower, making a little progress every day ? Column introduction Front-end Getting Started Tour: Exploring the Wonderful World of Web Development Welcome to the Front-End Getting Started Tour! If you are interested, you can subscribe to this column! This column is tailor-made for those who are interested in web development and […]

Publish vue3 components to npm

Table of Contents Prepare your components Create project Create steps Create component Encapsulate the components we need Export components Pack Use components release package Create npm account Login npm Switch npm source Publish to npm package.json package.json field Determine version number Version number format Version number increment logic vite packaging library mode Library mode configuration […]

Publish npm package quality subtest

Query quality interface https://registry.npmjs.org/-/v1/search?text=canvas-plus v0.0.1 quality 0.2987 Create a new folder canvas-plus Execute the command npm init Generate package.json {<!– –> “name”: “@3r/canvas-plus”, “version”: “0.0.1”, “description”: “a extension methods to canvas.”, “main”: “index.js”, “scripts”: {<!– –> “test”: “echo test” }, “keywords”: [ “canvas”, “tool”, “extension” ], “author”: “@3r”, “license”: “MIT”, “dependencies”: {<!– –> “@3r/tool”: “^1.3.2” […]

Create and package the js library to the npm warehouse through webpack

1. Create a project and perform basic configuration webpack configuration file: webpack.build.js const path = require(‘path’); module.exports = { mode:’development’, entry:’./src/webpack-numbers.js’, output: { filename: ‘webpack-numbers.js’, path: path.resolve(__dirname, ‘dist’), clean: true, }, }; package.json: script:{ “buildJs”: “webpack –config ./webpack.build.js”, “dev”: “set NODE_ENV=development & amp; & amp; webpack serve –open –config ./webpack.dev.js –mode=development”, } 2. Exposed library: […]