mirror of
https://github.com/ryan-haskell/elm-spa.git
synced 2024-08-17 08:20:34 +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
|
||||
node_modules
|
||||
dist
|
||||
Generated
|
||||
elm-spa-*.tgz
|
||||
|
||||
# Local Netlify folder
|
||||
.netlify
|
@ -1,10 +1,8 @@
|
||||
elm-stuff
|
||||
/src
|
||||
/node_modules
|
||||
/tests
|
||||
/elm.json
|
||||
/examples
|
||||
!.gitignore
|
||||
.github
|
||||
.netlify
|
||||
*.tgz
|
||||
/dist/elm.js
|
||||
/jest.config.js
|
||||
/tsconfig.json
|
||||
/src/**
|
||||
!/src/new/**
|
||||
!/src/defaults/**
|
@ -9,7 +9,8 @@
|
||||
"build": "tsc",
|
||||
"build:watch": "tsc --watch",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watchAll"
|
||||
"test:watch": "jest --watchAll",
|
||||
"publish:test": "npm run build && npm pack --dry-run"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -186,9 +186,6 @@ const compileMainElm = (env : Environment) => async () => {
|
||||
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}`)
|
||||
|
||||
const gzip = () =>
|
||||
Process.run(`gzip --keep --force ${output}`)
|
||||
|
||||
return (env === 'development')
|
||||
? elmMake()
|
||||
.then(_ => success()).catch(error => error)
|
||||
|
@ -7,8 +7,9 @@ import { bold, reset } from "../terminal"
|
||||
// Scaffold a new elm-spa project
|
||||
export default {
|
||||
run: () => {
|
||||
File.copy(config.folders.init, process.cwd())
|
||||
fs.mkdirSync(path.join(process.cwd(), 'src'))
|
||||
const dest = process.cwd()
|
||||
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()}`
|
||||
}
|
||||
}
|
@ -33,7 +33,6 @@ const config = {
|
||||
defaults: [
|
||||
[ 'Main.elm' ],
|
||||
[ 'Shared.elm' ],
|
||||
[ `Pages`, `${reserved.homepage}.elm` ],
|
||||
[ `Pages`, `${reserved.notFound}.elm` ],
|
||||
[ 'Page.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