How to serve a bootstrap template in sails 0.9?

后端 未结 2 1131
清歌不尽
清歌不尽 2020-12-15 08:23

I wanted to know how to serve a bootstrap template through newer sails version . Should I update the links of JS to something else . I tried moving js and images in asset fo

2条回答
  •  自闭症患者
    2020-12-15 08:52

    There are an issue with glyphicon. The destination of css file minified is /.temp/public/min/production.css and fonts must be in /.temp/public/fonts/. Then you have to copy fonts folder from assets/linker/fonts/ to /.temp/public/fonts/.

    You have to add this in the Gruntfile inside copy.dev.files array:

    {
        expand: true,
        cwd: './assets/linker/fonts',
        src: ['**/*'],
        dest: '.tmp/public/fonts'
    }
    

    Or in a more general way:

    {
        expand: true,
        cwd: './assets',
        src: ['**/fonts/*'],
        dest: '.tmp/public/fonts',
        flatten: true
    }
    

    It will search for all folders called fonts under assets. Use flatten to avoid subfolders.

    Cheers,

提交回复
热议问题