First step towards browserify
This commit is contained in:
parent
bd2261bed7
commit
8ff40ef433
4 changed files with 25 additions and 19 deletions
14
.gitignore
vendored
14
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
node_modules/
|
||||
*.min.js
|
||||
|
||||
# Created by https://www.gitignore.io/api/webstorm,node
|
||||
|
||||
|
@ -9,18 +9,6 @@ node_modules/
|
|||
# User-specific stuff:
|
||||
.idea
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/dataSources.ids
|
||||
.idea/dataSources.xml
|
||||
.idea/dataSources.local.xml
|
||||
.idea/sqlDataSources.xml
|
||||
.idea/dynamic.xml
|
||||
.idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/gradle.xml
|
||||
.idea/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/mongoSettings.xml
|
||||
|
||||
|
|
18
package.json
18
package.json
|
@ -9,8 +9,26 @@
|
|||
"dotenv": "^2.0.0",
|
||||
"express": "~4.0.0",
|
||||
"express-sslify": "^1.0.1",
|
||||
"jquery": "^2.2.3",
|
||||
"querystring": "~0.2.0",
|
||||
"react": "^15.0.1",
|
||||
"react-bootstrap": "^0.29.2",
|
||||
"react-dom": "^15.0.1",
|
||||
"request": "~2.34.0",
|
||||
"throng": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^6.2.0",
|
||||
"reactify": "^0.15.2",
|
||||
"uglify-js": "~2.4.15",
|
||||
"watchify": "^2.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "browserify public/script.jsx | uglifyjs -cm > public/bundle.min.js"
|
||||
},
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"reactify"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,15 +12,10 @@
|
|||
|
||||
<div id="content"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react-dom.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.16/browser.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.29.1/react-bootstrap.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
|
||||
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"
|
||||
crossorigin="anonymous"></script>
|
||||
<script type="text/babel" src="script.jsx"></script>
|
||||
<script type="text/javascript" src="bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var ReactDOM = require('react-dom');
|
||||
var ReactBootstrap = require('react-bootstrap');
|
||||
var $ = require('jquery');
|
||||
|
||||
/**
|
||||
* Obtains parameters from the hash of the URL
|
||||
* @return Object
|
||||
|
|
Loading…
Reference in a new issue