mirror of
https://github.com/beijaflor-io/ghcjs-commonjs.git
synced 2024-09-11 16:25:25 +03:00
Remove pandoc example
This commit is contained in:
parent
d3248d929f
commit
ef1e3f815f
@ -1,7 +1,5 @@
|
||||
# ghcjs-commonjs-examples
|
||||
This is a collection of runnable examples for **ghcjs-commonjs**, there's a
|
||||
`Vagrantfile` and `Dockerfile` in this directory so you can get everything up
|
||||
and running quickly.
|
||||
This is a collection of runnable examples for **ghcjs-commonjs**.
|
||||
|
||||
## `hello-world` Getting Started
|
||||
Take a look at the **`hello-world`** example to start. It shows off how to call
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"presets": ["es2015", "stage-1"]
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
Copyright (c) 2016 Pedro Tacla Yamada
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,2 +0,0 @@
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
@ -1,26 +0,0 @@
|
||||
-- Initial ghcjs-commonjs-webpack.cabal generated by cabal init. For
|
||||
-- further documentation, see http://haskell.org/cabal/users-guide/
|
||||
|
||||
name: ghcjs-commonjs-webpack
|
||||
version: 0.1.0.0
|
||||
-- synopsis:
|
||||
-- description:
|
||||
license: MIT
|
||||
license-file: LICENSE
|
||||
author: Pedro Tacla Yamada
|
||||
maintainer: tacla.yamada@gmail.com
|
||||
-- copyright:
|
||||
-- category:
|
||||
build-type: Simple
|
||||
-- extra-source-files:
|
||||
cabal-version: >=1.10
|
||||
|
||||
executable ghcjs-commonjs-webpack
|
||||
main-is: Main.hs
|
||||
-- other-modules:
|
||||
-- other-extensions:
|
||||
build-depends: base >=4.8 && <4.9
|
||||
, pandoc
|
||||
, ghcjs-commonjs
|
||||
hs-source-dirs: hs
|
||||
default-language: Haskell2010
|
@ -1,16 +0,0 @@
|
||||
import Control.Concurrent
|
||||
import qualified GHCJS.CommonJS as CommonJS
|
||||
|
||||
helloWorld = putStrLn "[haskell] Hello World"
|
||||
|
||||
launchTheMissiles :: IO Int
|
||||
launchTheMissiles = do
|
||||
threadDelay (1000 * 1000 * 5)
|
||||
putStrLn "[haskell] OMG what did I do?!"
|
||||
return 10
|
||||
|
||||
main =
|
||||
CommonJS.exportMain
|
||||
[ CommonJS.pack ("helloWorld", helloWorld)
|
||||
, CommonJS.pack ("launchTheMissiles", launchTheMissiles)
|
||||
]
|
@ -1,10 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="dist/index.bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,11 +0,0 @@
|
||||
// import Main from '../../Main.hs';
|
||||
|
||||
// console.log(Main);
|
||||
// Main(({wrapped}) => {
|
||||
// wrapped.launchTheMissiles();
|
||||
// wrapped.launchTheMissiles();
|
||||
// wrapped.launchTheMissiles();
|
||||
// wrapped.helloWorld();
|
||||
// });
|
||||
|
||||
// console.log('[javascript] Hello world');
|
9
examples/react-pandoc/js/index.js
vendored
9
examples/react-pandoc/js/index.js
vendored
@ -1,9 +0,0 @@
|
||||
const Main = require('../hs/Main.hs');
|
||||
console.log('[javascript] Hello there');
|
||||
console.log('[javascript] Main =', Main);
|
||||
Main(({wrapped}) => {
|
||||
wrapped.launchTheMissiles();
|
||||
wrapped.launchTheMissiles();
|
||||
wrapped.launchTheMissiles();
|
||||
wrapped.helloWorld();
|
||||
});
|
@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "ghcjs-loader-test",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"webpack-build": "webpack",
|
||||
"webpack-build-production": "NODE_ENV=production webpack",
|
||||
"build": "npm run webpack-build-production",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"babel": "^6.5.2",
|
||||
"babel-core": "^6.9.1",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-preset-es2015": "^6.9.0",
|
||||
"babel-preset-stage-1": "^6.5.0",
|
||||
"ghcjs-loader": "file:///Users/yamadapc/program/github.com/beijaflor-io/ghcjs-commonjs/ghcjs-loader",
|
||||
"ghcjs-require": "file:///Users/yamadapc/program/github.com/beijaflor-io/ghcjs-commonjs/ghcjs-require",
|
||||
"humanize": "0.0.9",
|
||||
"react": "^15.1.0",
|
||||
"webpack": "^1.13.1",
|
||||
"webpack-bundle-tracker": "0.0.93",
|
||||
"webpack-node-externals": "^1.2.0"
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
resolver: lts-6.3
|
||||
compiler: ghcjs-0.2.0.20160414_ghc-7.10.3
|
||||
compiler-check: match-exact
|
||||
setup-info:
|
||||
ghcjs:
|
||||
source:
|
||||
ghcjs-0.2.0.20160414_ghc-7.10.3:
|
||||
url: https://s3.amazonaws.com/ghcjs/ghcjs-0.2.0.20160414_ghc-7.10.3.tar.gz
|
||||
sha1: 6d6f307503be9e94e0c96ef1308c7cf224d06be3
|
||||
|
||||
packages:
|
||||
- .
|
||||
- ../../ghcjs-commonjs
|
@ -1,31 +0,0 @@
|
||||
const webpack = require('webpack');
|
||||
|
||||
exports = module.exports = {
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.hs$/,
|
||||
loader: 'ghcjs-loader',
|
||||
},
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
entry: './js/index.js',
|
||||
output: {
|
||||
path: './dist',
|
||||
filename: 'index.bundle.js',
|
||||
},
|
||||
plugins: [
|
||||
//new webpack.ContextReplacementPlugin(/.*$/, /NEVER_MATCH^/),
|
||||
//new webpack.ContextReplacementPlugin(/.*$/, /NEVER_MATCH^/),
|
||||
].concat(process.env.NODE_ENV === 'production' ? [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false,
|
||||
}
|
||||
}),
|
||||
] : [])
|
||||
};
|
Loading…
Reference in New Issue
Block a user