Skip to content

diffplug/webtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
runner
Aug 4, 2024
355ac15 · Aug 4, 2024

History

17 Commits
Jul 5, 2024
Jul 5, 2024
Aug 4, 2024
Jul 5, 2024
Aug 4, 2024
Jul 5, 2024
Jul 5, 2024
Jul 5, 2024
Jul 5, 2024
Jul 5, 2024
Jul 5, 2024
Jul 5, 2024
Jul 5, 2024
Aug 4, 2024

Repository files navigation

DiffPlug Webtools

  • node - hassle-free npm install and npm run blah
  • static server - a simple static file server

Node

apply plugin: 'com.diffplug.webtools.node'
node {
  // looks for an `.nvmrc` in this folder or its parent
  // downloads the corresponding version of node `npm ci`

  // and then it will run `npm run blah` like so
  npm_run 'blah', {
    inputs.file('tsconfig.json').withPathSensitivity(PathSensitivity.RELATIVE)
    inputs.dir('somedir').withPathSensitivity(PathSensitivity.RELATIVE)
    outputs.dir('build/some-output')
  }
}

Static Server

tasks.register('serve', com.diffplug.webtools.serve.StaticServerTask) {
  dir = file('build/static')
  port = 8080 // by default
}

About

Gradle plugins for website tooling

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages