
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
es6hello_practice
Advanced tools
node.js+webpack4+babelのひな形となるプロジェクト
src/index.js
export { default as Greeting } from './hello.js';
src/hello.js
/**
* 挨拶クラス
* (ECMAScript 6 スタイル)
* Helloクラスがdefaultのexport対象とする
*/
export default class Hello {
//コンストラクタ
constructor() {
}
/**
* 挨拶をする
* @returns {string}
*/
sayHello() {
const hello = 'Hi, there!';
console.log(hello);
return hello;
}
}
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example</title>
</head>
<body>
<script src="js/app.js"></script>
<script>
const greeting = new com.example.Greeting();
alert(greeting.sayHello());
</script>
</body>
</html>
package.json
{
"name": "es6hello",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server",
"build": "webpack --config webpack.config.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Tom Misawa <riversun.org@gmail.com> (https://github.com/riversun)",
"license": "ISC",
"repository": {
"type": "git",
"url": "git+https://github.com/riversun/es6hello.git"
},
"bugs": {
"url": "https://github.com/riversun/es6hello/issues"
},
"homepage": "https://github.com/riversun/es6hello#readme",
"devDependencies": {
"@babel/core": "^7.1.5",
"@babel/preset-env": "^7.1.5",
"babel-loader": "^8.0.4",
"webpack": "^4.19.1",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.8"
}
}
webpack.config.js
const path = require("path");
module.exports = {
mode: 'development',
devServer: {
open: true,
openPage: "index.html",
contentBase: path.join(__dirname, 'public'),
watchContentBase: true,
port: 8080,
},
entry: {app: './src/index.js'},
output: {
path: path.join(__dirname, "dist"),
publicPath: "/js/",
filename: '[name].js',
library: ["com", "example"],
libraryTarget: 'umd'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"targets": "> 0.25%, not dead"
}
]
]
}
}
}
]
},
devtool: 'inline-source-map'
};
npm start
npm run build
FAQs
## 概要
The npm package es6hello_practice receives a total of 0 weekly downloads. As such, es6hello_practice popularity was classified as not popular.
We found that es6hello_practice demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.