User Tools

Site Tools


This is an old revision of the document!

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.


After the usual setup, go to your project folder's top level in a terminal window. Then type:

npm install --save grunt-contrib-copy grunt-contrib-watch

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:


Use this as a starting point:

module.exports = function(grunt) {
    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']);
entwine/combining_several_twine_stories_into_one.1463673868.txt.gz · Last modified: 2017/10/09 20:37 (external edit)