mirror of
https://github.com/ryannhg/elm-spa.git
synced 2024-11-22 09:44:55 +03:00
prepare for beta publish
This commit is contained in:
parent
941222d1da
commit
2135db8cfc
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,7 +3,6 @@
|
|||||||
elm-stuff
|
elm-stuff
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
Generated
|
|
||||||
elm-spa-*.tgz
|
|
||||||
# Local Netlify folder
|
# Local Netlify folder
|
||||||
.netlify
|
.netlify
|
@ -1,10 +1,8 @@
|
|||||||
elm-stuff
|
elm-stuff
|
||||||
/src
|
/node_modules
|
||||||
/tests
|
/tests
|
||||||
/elm.json
|
/jest.config.js
|
||||||
/examples
|
/tsconfig.json
|
||||||
!.gitignore
|
/src/**
|
||||||
.github
|
!/src/new/**
|
||||||
.netlify
|
!/src/defaults/**
|
||||||
*.tgz
|
|
||||||
/dist/elm.js
|
|
@ -9,7 +9,8 @@
|
|||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"build:watch": "tsc --watch",
|
"build:watch": "tsc --watch",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watchAll"
|
"test:watch": "jest --watchAll",
|
||||||
|
"publish:test": "npm run build && npm pack --dry-run"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -186,9 +186,6 @@ const compileMainElm = (env : Environment) => async () => {
|
|||||||
const minify = () =>
|
const minify = () =>
|
||||||
Process.run(`${config.binaries.terser} ${output} --compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' | ${config.binaries.terser} --mangle --output=${output}`)
|
Process.run(`${config.binaries.terser} ${output} --compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' | ${config.binaries.terser} --mangle --output=${output}`)
|
||||||
|
|
||||||
const gzip = () =>
|
|
||||||
Process.run(`gzip --keep --force ${output}`)
|
|
||||||
|
|
||||||
return (env === 'development')
|
return (env === 'development')
|
||||||
? elmMake()
|
? elmMake()
|
||||||
.then(_ => success()).catch(error => error)
|
.then(_ => success()).catch(error => error)
|
||||||
|
@ -7,8 +7,9 @@ import { bold, reset } from "../terminal"
|
|||||||
// Scaffold a new elm-spa project
|
// Scaffold a new elm-spa project
|
||||||
export default {
|
export default {
|
||||||
run: () => {
|
run: () => {
|
||||||
File.copy(config.folders.init, process.cwd())
|
const dest = process.cwd()
|
||||||
fs.mkdirSync(path.join(process.cwd(), 'src'))
|
File.copy(config.folders.init, dest)
|
||||||
|
try { fs.renameSync(path.join(dest, '_gitignore'), path.join(dest, '.gitignore')) } catch (_) {}
|
||||||
return ` ${bold}New project created in:${reset}\n ${process.cwd()}`
|
return ` ${bold}New project created in:${reset}\n ${process.cwd()}`
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -33,7 +33,6 @@ const config = {
|
|||||||
defaults: [
|
defaults: [
|
||||||
[ 'Main.elm' ],
|
[ 'Main.elm' ],
|
||||||
[ 'Shared.elm' ],
|
[ 'Shared.elm' ],
|
||||||
[ `Pages`, `${reserved.homepage}.elm` ],
|
|
||||||
[ `Pages`, `${reserved.notFound}.elm` ],
|
[ `Pages`, `${reserved.notFound}.elm` ],
|
||||||
[ 'Page.elm' ],
|
[ 'Page.elm' ],
|
||||||
[ 'Request.elm' ],
|
[ 'Request.elm' ],
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
module Pages.Home_ exposing (page)
|
|
||||||
|
|
||||||
import Html exposing (..)
|
|
||||||
import Html.Attributes exposing (attribute, href, style)
|
|
||||||
import View exposing (View)
|
|
||||||
|
|
||||||
|
|
||||||
page : View Never
|
|
||||||
page =
|
|
||||||
{ title = "Homepage"
|
|
||||||
, body =
|
|
||||||
[ div
|
|
||||||
[ style "font-family" "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"
|
|
||||||
, style "color" "#333"
|
|
||||||
, style "padding" "4rem"
|
|
||||||
]
|
|
||||||
[ h1 [] [ text "🎉 Hooray– it's working!" ]
|
|
||||||
, p []
|
|
||||||
[ strong [] [ text "Nice work! " ]
|
|
||||||
, text "Learn more at "
|
|
||||||
, a [ href "https://elm-spa.dev/guide", attribute "target" "_blank" ]
|
|
||||||
[ text "elm-spa.dev" ]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
5
src/cli/src/new/_gitignore
Normal file
5
src/cli/src/new/_gitignore
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.DS_Store
|
||||||
|
.elm-spa
|
||||||
|
elm-stuff
|
||||||
|
node_modules
|
||||||
|
dist
|
11
src/cli/src/new/src/Pages/Home_.elm
Normal file
11
src/cli/src/new/src/Pages/Home_.elm
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
module Pages.Home_ exposing (page)
|
||||||
|
|
||||||
|
import Html
|
||||||
|
import View exposing (View)
|
||||||
|
|
||||||
|
|
||||||
|
page : View Never
|
||||||
|
page =
|
||||||
|
{ title = "Homepage"
|
||||||
|
, body = [ Html.text "Hello, world!" ]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user