User Tools

Site Tools


entwine:combining_several_twine_stories_into_one

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

entwine:combining_several_twine_stories_into_one [2016/05/19 12:04]
klembot created
entwine:combining_several_twine_stories_into_one [2017/10/09 20:39]
Line 1: Line 1:
-===== Combining Several Twine Stories Into One ===== 
  
-If you're working on a longer work, you may find it easier to segment it into separate stories in Twine. This page explains how to merge them into one published file. 
- 
-==== Setup ==== 
- 
-After the [[setting_up_a_project|usual setup]], go to your project folder'​s top level in a terminal window. Then type: 
-<​code>​ 
-npm install --save grunt-contrib-copy grunt-contrib-watch 
-</​code>​ 
- 
-You'll also need to download the story format you plan on using. Follow the appropriate link and save it from your browser to **src/​format.js**:​ 
- 
-  * [[https://​bitbucket.org/​klembot/​twinejs/​raw/​e473ee4d26cf5eac4b16f3a55ecc25c763a14092/​story-formats/​Harlowe/​format.js?​at=default|Harlowe]] 
-  * [[https://​bitbucket.org/​klembot/​twinejs/​raw/​e473ee4d26cf5eac4b16f3a55ecc25c763a14092/​story-formats/​SugarCube/​format.js?​at=default|SugarCube]] 
-  * [[bitbucket.org/​klembot/​twinejs/​raw/​e473ee4d26cf5eac4b16f3a55ecc25c763a14092/​story-formats/​Snowman/​format.js?​at=default|Snowman]] 
- 
-==== Gruntfile ==== 
- 
-Use this as a starting point: 
- 
-<code javascript Gruntfile.js>​ 
-module.exports = function(grunt) { 
-  require('​load-grunt-tasks'​)(grunt);​ 
-  
-  grunt.initConfig({ 
-    copy: { 
-      fromTwine: { 
-        src: [ 
-          '/​Users/​Me/​Documents/​Twine/​Stories/​My Story Part 1.html',​ 
-          '/​Users/​Me/​Documents/​Twine/​Stories/​My Story Part 2.html'​ 
-        ], 
-        dest: '​src/'​ 
-      } 
-    }, 
-    ​ 
-    entwine: { 
-      default: { 
-        files: { 
-          '​dist/​my-story.html':​ ['​src/​*.html'​] 
-        }, 
-        options: { 
-          format: '​src/​format.js',​ 
-          name: 'My Completed Story' 
-        } 
-      } 
-    }, 
-    ​ 
-    watch: { 
-      twineEdits: { 
-        files: [ 
-          '/​Users/​Me/​Documents/​Twine/​Stories/​My Story Part 1.html',​ 
-          '/​Users/​Me/​Documents/​Twine/​Stories/​My Story Part 2.html'​ 
-        ], 
-        tasks: '​copy:​fromTwine'​ 
-      }, 
-      twineFiles: { 
-        files: '​src/​*.html',​ 
-        tasks: '​entwine'​ 
-      } 
-    } 
-  }); 
-  
-  grunt.registerTask('​default',​ ['​copy'​]);​ 
-}; 
-</​code>​ 
entwine/combining_several_twine_stories_into_one.txt ยท Last modified: 2017/10/09 20:39 (external edit)