design-web-toolkit icon indicating copy to clipboard operation
design-web-toolkit copied to clipboard

template HTML di esempio: ReferenceError: build is not defined

Open matteoturra opened this issue 6 years ago • 0 comments

Sul web server ho la cartella 'wtk' contenente:

  • la directory 'build' scaricata da https://github.com/italia/design-web-toolkit/tree/gh-pages/build
  • il file "Template" https://raw.githubusercontent.com/italia/design-web-toolkit/gh-pages/build/index.html

La struttura è:

  • webroot
    • wtk
      • build
      • IWT.min.js
      • ....
    • index.html

Nella documentazione è riportato di modificare alla riga 63 con il percorso relativo alla webroot <script>__PUBLIC_PATH__ = '{{ '/build/' | path | replace(".html", "/") }}'</script>

Quindi dovrebbe essere: <script>__PUBLIC_PATH__ = '{{ '/wtk/build/' | path | replace(".html", "/") }}'</script> ma da errore: "Uncaught ReferenceError: wtk is not defined"

oppure si sostituisce tutto: <script>__PUBLIC_PATH__ = '/wtk/build/'</script> ma comunque vedo errori nel caricamento degli altri file perchè vengono richiesti su path errati:

/wtk/%7B%7B%20'/build/vendor/modernizr.js'%20%7C%20path%20%7D%7D net::ERR_ABORTED 404 (Not Found)
/wtk/%7B%7B%20'/build/vendor/jquery.min.js'%20%7C%20path%20%7D%7D net::ERR_ABORTED 404 (Not Found)
/wtk/%7B%7B%20'/build/build.css'%20%7C%20path%20%7D%7D net::ERR_ABORTED 404 (Not Found)
/wtk/%7B%7B%20'/build/IWT.min.js'%20%7C%20path%20%7D%7D net::ERR_ABORTED 404 (Not Found)

matteoturra avatar Nov 09 '18 15:11 matteoturra