Skip to content

chrisgonzalez/static-dokku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Dokku Template

Setup

  1. Make sure you have SASS installed, or just ignore it if you're a purist ;)
  2. Run 'npm install'
  3. Add your Dokku remote- $: git remote add SOMENAME dokku@someserver.com:SUBDOMAIN

Instructions:

  1. Run the local server and sass watchers via 'npm run local' and 'npm run sass', respectively
  2. Design something awesome
  3. Check it on your machine at localhost:5000
  4. Push to the remote! $: git push SOMENAME master
  5. Success! Internet!!

Details:

All working source files will live in src/

All design files, or static assets can live anywhere else.

Build Steps (if you're deploying a static site/page thing)

  1. Wrap all style tags you'd like minified in comments of this structure:

<!-- styles /finaldirectory/filename.min.css -->  
    <link rel="stylesheet" href="mystyles1.css" />  
    <link rel="stylesheet" href="mystyles2.css" />  
<!-- /styles /finaldirectory/filename.min.css -->  
  1. Wrap all script tags you'd like minified in comments of this structure:

<!-- styles /finaldirectory/filename.min.js -->  
    <script src="js/myfile1.js"></script>  
    <script src="js/myfile2.js"></script>  
<!-- /styles /finaldirectory/filename.min.js -->  
  1. If you need to copy any directories (images, data, etc), add commands like 'cp -r src/images dist/images;' to the end of the build script in package.json, where src/images is your working directory, and dist/images is the production directory.

  2. Run 'npm run build' in your console and you'll get a magically modified html file with all your scripts and styles minified. You can use as many of these comment blocks as you'd like, just make sure to specify a unique filename in the opening and closing comments.

About

Static Site setup for dokku

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published