append-file
A node module to easily insert content from one file or more to another.
Last updated 5 years ago by chuson1996 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install append-file -g
SYNC missed versions from official npm registry.

#Append file

A node module to easily insert content from a file to another. Check out the example below.

##Install:

NPM: npm install -g append-file


<!-- sou.css -->
body{
    background-color:#fff;
}
h1{
    font-size:30px;
}

<!-- script.js -->
alert('hello');
alert('hello again');

<!-- dest.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        /*<sou.css>*/
        /*</sou.css>*/
    </style>
</head>
<body>
    <script>
        /*<script.js>*/
        /*</script.js>*/
    </script>
</body>
</html>

Now remember to always put source file(s) in the same directory of the destination file. Execute this command to append sou.css and script.js to dest.html

append-file dest.html

Result:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        /*<sou.css>*/
        body{
            background-color:#fff;
        }
        h1{
            font-size:30px;
        }
        /*</sou.css>*/
    </style>
</head>
<body>
    <script>
        /*<script.js>*/
        alert('hello');
        alert('hello again');
        /*</script.js>*/
    </script>
</body>
</html>

Current Tags

  • 1.0.2                                ...           latest (5 years ago)

3 Versions

  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |