mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-24 02:13:43 +03:00
Copy boilerplate to the popup dir
This commit is contained in:
parent
d7a7fcf310
commit
24e3400376
|
@ -0,0 +1,8 @@
|
|||
[ignore]
|
||||
.*/test/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
|
||||
[options]
|
4
extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/.gitignore
vendored
Normal file
4
extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
node_modules
|
||||
npm-debug.log
|
||||
.swp
|
||||
dist
|
|
@ -0,0 +1,11 @@
|
|||
# React + Flow + Webpack 2 Boilerplate with Babel
|
||||
|
||||
Switch branches for adding/removing Babel for JSX + Flowtype.
|
||||
|
||||
## Install
|
||||
|
||||
`yarn install` or `npm install --dev`
|
||||
|
||||
## Run
|
||||
|
||||
`yarn/npm run build`
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "hello-react",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.24.1",
|
||||
"babel-loader": "^7.0.0",
|
||||
"babel-preset-flow": "^6.23.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"babili-webpack-plugin": "^0.0.11",
|
||||
"flow-bin": "^0.45.0",
|
||||
"react": "^15.5.4",
|
||||
"react-dom": "^15.5.4",
|
||||
"webpack": "^2.5.1"
|
||||
},
|
||||
"scripts": {
|
||||
"check": "flow status",
|
||||
"build:prod": "webpack --define process.env.NODE_ENV=\"'production'\" --env=prod",
|
||||
"build:dev:nocomp": "webpack --define process.env.NODE_ENV=\"'production'\" --env=dev",
|
||||
"build:dev": "webpack --debug --devtool source-map --output-pathinfo --env=dev",
|
||||
"build": "npm run build:dev"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
let x:string; // webpack/babel must remove type here!
|
||||
x = 'Search me in the compiled bundle!';
|
||||
|
||||
let t:string;
|
||||
t = 12345; // Flow must detect error here!
|
||||
|
||||
// webpack/babel must transpile JSX to JS below:
|
||||
ReactDOM.render(
|
||||
<h1>Hello from React WITH BABEL</h1>,
|
||||
document.getElementById('root')
|
||||
);
|
|
@ -0,0 +1,31 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const BabiliPlugin = require('babili-webpack-plugin');
|
||||
|
||||
module.exports = (env, ...flags) => ({
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist'),
|
||||
filename: `bundle${env === 'prod' ? '.min' : ''}.js`,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
include: path.join(__dirname, 'src'),
|
||||
use: [{
|
||||
loader: 'babel-loader',
|
||||
options: { presets: ['react', 'flow'] },
|
||||
}],
|
||||
}
|
||||
],
|
||||
},
|
||||
plugins: env === 'prod' ?
|
||||
[
|
||||
/* Production */
|
||||
new BabiliPlugin(),
|
||||
] : [
|
||||
/* Development */
|
||||
],
|
||||
});
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user