Merge branch 'init-project'

jh-changes
Shin'ya Ueoka 7 years ago
commit b501db2a46
  1. 2
      .gitignore
  2. 12
      manifest.json
  3. 3129
      package-lock.json
  4. 23
      package.json
  5. 3
      src/index.js
  6. 18
      src/module.js
  7. 32
      webpack.config.js

2
.gitignore vendored

@ -0,0 +1,2 @@
/node_modules/
/build/

@ -0,0 +1,12 @@
{
"manifest_version": 2,
"name": "Vim Vixen",
"description": "Vim Vixen",
"version": "0.0.1",
"content_scripts": [
{
"matches": [ "http://*/*", "https://*/*" ],
"js": [ "build/index.js" ]
}
]
}

3129
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,23 @@
{
"name": "vim-vixen",
"description": "Vim vixen",
"scripts": {
"start": "webpack -w --debug"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ueokande/vim-vixen.git"
},
"author": "Shin'ya Ueoka",
"license": "MIT",
"bugs": {
"url": "https://github.com/ueokande/vim-vixen/issues"
},
"homepage": "https://github.com/ueokande/vim-vixen",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-loader": "^7.1.1",
"babel-preset-es2015": "^6.24.1",
"webpack": "^3.5.3"
}
}

@ -0,0 +1,3 @@
import * as Module from './module';
Module.initialize()

@ -0,0 +1,18 @@
const initialize = (url) => {
let p = document.createElement("p");
p.textContent = "Hello Vim Vixen";
p.style.position = 'fixed';
p.style.right = '0';
p.style.bottom = '0';
p.style.padding = '0rem .5rem';
p.style.margin = '0';
p.style.backgroundColor = 'lightgray';
p.style.border = 'gray';
p.style.boxShadow = '0 0 2px gray inset';
p.style.borderRadius = '3px';
p.style.fontFamily = 'monospace';
document.body.append(p)
}
export { initialize };

@ -0,0 +1,32 @@
var path = require('path');
const src = path.resolve(__dirname, 'src');
const dist = path.resolve(__dirname, 'build');
module.exports = {
entry: {
index: path.join(src, 'index.js')
},
output: {
path: dist,
filename: '[name].js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: [ 'es2015' ]
}
}
]
},
resolve: {
extensions: [ '.js' ]
}
};