diff --git a/examples/build.sbt b/examples/build.sbt index c4683a02..6d1b08e2 100644 --- a/examples/build.sbt +++ b/examples/build.sbt @@ -104,6 +104,15 @@ lazy val mario = .settings(commonSettings: _*) .settings(name := "mario") +lazy val nonpm = + (project in file("no-npm")) + .enablePlugins(ScalaJSPlugin) + .settings(commonSettings: _*) + .settings( + name := "No NPM", + scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.NoModule) } + ) + lazy val subcomponents = (project in file("subcomponents")) .enablePlugins(ScalaJSPlugin) @@ -127,6 +136,7 @@ lazy val exampleProjects: List[String] = "http", "indigo", "mario", + "nonpm", "subcomponents", "websocket" ) diff --git a/examples/no-npm/README.md b/examples/no-npm/README.md new file mode 100644 index 00000000..635aa185 --- /dev/null +++ b/examples/no-npm/README.md @@ -0,0 +1,13 @@ +# Tyrian counter example - No NPM Version! + +This is yet another version of the Counter example, but this one is just plain old HTML + JavaScript. No NPM, no bundlers, nothing. + +You will need a static http server unfortunately, you can install one globally with ...npm (there are others, I like this one): + +```npm install -g http-server``` + +To run your http server, `cd` into this directory (`tyrian/examples/no-npm`) using your terminal, and then run: + +```http-server -c-1``` + +Then navigate to [http://localhost:8080/](http://localhost:8080/) in your browser of choice. diff --git a/examples/no-npm/index.html b/examples/no-npm/index.html new file mode 100644 index 00000000..f048f3d3 --- /dev/null +++ b/examples/no-npm/index.html @@ -0,0 +1,17 @@ + + + +
+ +